<commit_before># Loft

*Media assets manager for [Character CMS](https://github.com/slate-studio/chr).*


### Installation

Add to ```Gemfile```:

    gem 'loft'

Setup a new model for assets ```asset.rb```:

```ruby
class Asset
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::SerializableId
  include Mongoid::LoftAsset
end
```

Add controller for asset model to make it accesible via CMS, e.g. ```app/controllers/admin/assets_controller.rb```:

```ruby
class Admin::AssetsController < Admin::BaseController
  mongosteen
  has_scope :by_type
  json_config({ methods: [ :item_thumbnail, :created_ago ] })
end
```

Add admin assets controller to ```routes.rb```:

```ruby
resources :assets
```

Add to ```admin.scss```:

```scss
@import "loft";
```

Add to ```admin.coffee``` character configuration object:

```coffee
loft: new Loft('Files', 'asset', '/admin/assets')
```


## Notes

1. Check out [kraken.io](https://github.com/kraken-io/kraken-ruby) for image optimization.
1. Fix an issue with renaming assets.

## Loft family

- [Character](https://github.com/slate-studio/chr): Powerful javascript CMS for apps
- [Mongosteen](https://github.com/slate-studio/mongosteen): An easy way to add restful actions for mongoid models
- [Inverter](https://github.com/slate-studio/inverter): An easy way to connect Rails templates content to CMS


## License

Copyright © 2015 [Slate Studio, LLC](http://slatestudio.com). Loft is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
<commit_msg>update readme;<commit_after># Loft

*Media assets manager for [Character CMS](https://github.com/slate-studio/chr).*


### Installation

Add to ```Gemfile```:

    gem 'loft'

Setup a new model for assets ```asset.rb```:

```ruby
class Asset
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::SerializableId
  include Mongoid::LoftAsset
end
```

Add controller for asset model to make it accesible via CMS, e.g. ```app/controllers/admin/assets_controller.rb```:

```ruby
class Admin::AssetsController < Admin::BaseController
  mongosteen
  has_scope :by_type
  json_config({ methods: [ :item_thumbnail, :created_ago ] })
end
```

Add admin assets controller to ```routes.rb```:

```ruby
resources :assets
```

Add to ```admin.scss```:

```scss
@import "loft";
```

Add to ```admin.coffee``` character configuration object:

```coffee
loft: new Loft('Files', 'asset', '/admin/assets')
```


## Notes

1. Check out [kraken.io](https://github.com/kraken-io/kraken-ruby) for image optimization.

## Loft family

- [Character](https://github.com/slate-studio/chr): Powerful javascript CMS for apps
- [Mongosteen](https://github.com/slate-studio/mongosteen): An easy way to add restful actions for mongoid models
- [Inverter](https://github.com/slate-studio/inverter): An easy way to connect Rails templates content to CMS


## License

Copyright © 2015 [Slate Studio, LLC](http://slatestudio.com). Loft is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).

{'fraction_non_alphanumeric': 0.14758352254297763, 'fraction_numerical': 0.0035679532922478106, 'mean_word_length': 4.851992409867172, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7161114', 'n_tokens_mistral': 1051, 'n_tokens_neox': 995, 'n_words': 298}