chr 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.scss-style.yml +3 -3
  3. data/{LICENSE → LICENSE.md} +0 -0
  4. data/README.md +24 -10
  5. data/app/assets/javascripts/chr/list_tabs.coffee +1 -2
  6. data/app/assets/javascripts/chr/view_tabs.coffee +7 -6
  7. data/app/assets/stylesheets/chr/layout.scss +15 -2
  8. data/app/assets/stylesheets/chr/themes/basic.scss +8 -16
  9. data/chr.gemspec +33 -34
  10. data/lib/chr.rb +9 -12
  11. data/lib/chr/version.rb +1 -1
  12. metadata +8 -51
  13. data/app/assets/javascripts/vendor/slip.js +0 -804
  14. data/bin/chr +0 -13
  15. data/docs/bootstrap.md +0 -23
  16. data/docs/demo.png +0 -0
  17. data/docs/notes.md +0 -3
  18. data/docs/rails.md +0 -233
  19. data/lib/chr/app_builder.rb +0 -378
  20. data/lib/chr/generators/app_generator.rb +0 -211
  21. data/lib/generators/chr/controller_generator.rb +0 -18
  22. data/templates/Gemfile.erb +0 -41
  23. data/templates/Procfile +0 -1
  24. data/templates/README.md.erb +0 -45
  25. data/templates/_analytics.html.erb +0 -1
  26. data/templates/_flashes.html.erb +0 -7
  27. data/templates/_javascript.html.erb +0 -5
  28. data/templates/application.coffee +0 -2
  29. data/templates/application.scss +0 -1
  30. data/templates/application.yml +0 -6
  31. data/templates/application_gitignore +0 -15
  32. data/templates/application_layout.html.erb.erb +0 -17
  33. data/templates/bin_setup.erb +0 -35
  34. data/templates/body_class_helper.rb +0 -15
  35. data/templates/bundler_audit.rake +0 -12
  36. data/templates/carrierwave.rb +0 -21
  37. data/templates/character_admin.coffee.erb +0 -38
  38. data/templates/character_admin.scss +0 -14
  39. data/templates/character_admin_index.html.erb +0 -5
  40. data/templates/character_admin_layout.html.erb.erb +0 -21
  41. data/templates/character_base_controller.rb +0 -14
  42. data/templates/dev.rake +0 -12
  43. data/templates/devise_overrides_passwords_controller.rb +0 -11
  44. data/templates/devise_overrides_passwords_edit.html.erb +0 -31
  45. data/templates/devise_overrides_passwords_new.html.erb +0 -19
  46. data/templates/devise_overrides_sessions_controller.rb +0 -20
  47. data/templates/devise_overrides_sessions_new.html.erb +0 -29
  48. data/templates/errors.rb +0 -34
  49. data/templates/json_encoding.rb +0 -1
  50. data/templates/puma.rb +0 -18
  51. data/templates/routes.rb +0 -86
  52. data/templates/sample.env +0 -6
  53. data/templates/secrets.yml +0 -14
  54. data/templates/smtp.rb +0 -9
  55. data/templates/staging.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a755aafe8778141b4ce3fb5556a014d2039a988
4
- data.tar.gz: 5c0d98c9b09456a98677fb73a35008f07f660e3a
3
+ metadata.gz: b55a91e10b5885322a2b6040222d0d080d19cff0
4
+ data.tar.gz: 66ed4337758793f3f5d13ef9550ab7032b0a2f81
5
5
  SHA512:
6
- metadata.gz: b1e725daa088a71cd8fc934243bafeb3642cd56db8ff763324ded29c5e38cc6aade5d0d147d0b8d4f9542dc099b7d13c735c32b4a0ac21fab747e018a15c4439
7
- data.tar.gz: 296dd09c285c59071b7eda8a9a174aaea15528b1e358d256aa913526207102d7ff8611c20b3eb423cff034c8da31175052182fd5b098d701cf2ba6932b6e3bf9
6
+ metadata.gz: fd4f48dac1bc4f0463c735be62edc6dc4acd28f673d05a631b42dc03db81dc2a1b84213578f179010f034ada780992a2df70bade7093372457e3d67182b1defc
7
+ data.tar.gz: 3f7fb2d653fdc063778b37d224e69b1f24be2ddf32f7b7a5932de23c83ecca8b4dfc026842d83d08dddc931bf1144b58f403f055183288d7a817e5ca1c6a2ad3
@@ -59,9 +59,9 @@ linters:
59
59
  enabled: true
60
60
  force_nesting: true
61
61
  NameFormat:
62
- enabled: true
63
- allow_leading_underscore: true
64
- convention: hyphenated_lowercase
62
+ enabled: false
63
+ #allow_leading_underscore: true
64
+ #convention: hyphenated_lowercase
65
65
  NestingDepth:
66
66
  enabled: true
67
67
  max_depth: 4
File without changes
data/README.md CHANGED
@@ -1,32 +1,46 @@
1
- # Character
1
+ # Character
2
2
  [![GitHub version](https://badge.fury.io/gh/slate-studio%2Fchr.svg)](https://badge.fury.io/gh/slate-studio%2Fchr)
3
3
  [![Build Status](https://travis-ci.org/slate-studio/chr.svg?branch=master)](https://travis-ci.org/slate-studio/chr)
4
4
  [![Code Climate](https://codeclimate.com/github/slate-studio/chr/badges/gpa.svg)](https://codeclimate.com/github/slate-studio/chr)
5
5
 
6
- Character is powerful responsive javascript-based CMS for website and applications used by [Slate Studio](https://www.slatestudio.com), build with [CoffeeScript](http://coffeescript.org/) & [jQuery](https://jquery.com/).
6
+ Character is powerful responsive javascript-based CMS for website and
7
+ applications used by [Slate Studio](https://www.slatestudio.com), build with
8
+ [CoffeeScript](http://coffeescript.org/) & [jQuery](https://jquery.com/).
7
9
 
8
10
 
9
11
  ## Quick Start
10
12
 
11
- For Rails demo project and to understand how Character works please check out our boilerplate project [Venice](https://github.com/alexkravets/venice) — it assumes you have Ruby & MongoDB installed on your local machine.
13
+ For Rails demo project and to understand how Character works please check out
14
+ our boilerplate project [Venice](https://github.com/alexkravets/venice) — it
15
+ assumes you have Ruby & MongoDB installed on your local machine.
12
16
 
13
17
 
14
18
  ## Character Family:
15
19
 
16
- - [Character](https://github.com/slate-studio/chr): Powerful responsive javascript CMS engine built with CoffeeSript & jQuery
17
- - [Mongosteen](https://github.com/slate-studio/mongosteen): Add CRUD actions for Mongoid models with one line
18
- - [Inverter](https://github.com/slate-studio/inverter): An easy way to connect Rails templates content to Character CMS
19
- - [Loft](https://github.com/slate-studio/loft): Media assets manager for Character CMS
20
- - [Venice](https://github.com/alexkravets/venice): Website boilerplate for Rails + MongoDB projects
20
+ - [Character](https://github.com/slate-studio/chr): Powerful responsive
21
+ javascript CMS engine built with CoffeeSript & jQuery
22
+ - [Venice](https://github.com/alexkravets/venice): Website boilerplate for
23
+ Rails + MongoDB projects
24
+ - [Mongosteen](https://github.com/slate-studio/mongosteen): Add CRUD actions
25
+ for Mongoid models with one line
26
+ - [Loft](https://github.com/slate-studio/loft): Media assets manager for
27
+ Character CMS
28
+ - [Inverter](https://github.com/slate-studio/inverter): An easy way to connect
29
+ Rails templates content to Character CMS
21
30
 
22
31
 
23
32
  ## License
24
33
 
25
- Copyright © 2015 [Slate Studio, LLC](http://slatestudio.com). Character is free software, and may be redistributed under the terms specified in the [license](LICENSE).
34
+ Copyright © 2015 [Slate Studio, LLC](http://slatestudio.com). Character is free
35
+ software, and may be redistributed under the terms specified in the
36
+ [license](LICENSE.md).
26
37
 
27
38
 
28
39
  ## About Slate Studio
29
40
 
30
41
  [![Slate Studio](https://slate-git-images.s3-us-west-1.amazonaws.com/slate.png)](http://slatestudio.com)
31
42
 
32
- Character is maintained and funded by [Slate Studio, LLC](http://slatestudio.com). Tweet your questions or suggestions to [@slatestudio](https://twitter.com/slatestudio) and while you’re at it follow us too.
43
+ Character is maintained and funded by
44
+ [Slate Studio, LLC](http://slatestudio.com). Tweet your questions or suggestions
45
+ to [@slatestudio](https://twitter.com/slatestudio) and while you’re at it follow
46
+ us too.
@@ -18,12 +18,11 @@
18
18
  @selectTab($firstTab, false)
19
19
 
20
20
  _add_tab: (title, urlParams) ->
21
- $tab =$ "<a href='#'>#{title}</a>"
21
+ $tab =$ "<button>#{title}</button>"
22
22
  @$tabs.append $tab
23
23
  @tabLinks.push $tab
24
24
 
25
25
  $tab.on "click", (e) =>
26
- e.preventDefault()
27
26
  $tab =$ e.currentTarget
28
27
  @selectTab($tab, true)
29
28
 
@@ -22,14 +22,14 @@
22
22
  @viewTabs =
23
23
  # PRIVATE ===================================================================
24
24
  _build_tabs: ->
25
- @$title.addClass 'title-with-tabs'
25
+ @$title.addClass "title-with-tabs"
26
26
 
27
27
  @_create_tabs()
28
28
  @_activate_tab(0)
29
29
 
30
30
  _create_tabs: ->
31
31
  @tabGroups = []
32
- groupsHash = {}
32
+ groupsHash = {}
33
33
 
34
34
  for g in @form.groups
35
35
  groupsHash[g.klassName] = g
@@ -42,18 +42,19 @@
42
42
  @$tabs.append(@_create_button(tab_title))
43
43
 
44
44
  _create_button: (name) ->
45
- $tabButton =$ "<a href='#'>#{ name }</a>"
46
- $tabButton.on 'click', (e) =>
45
+ $tabButton =$ "<button>#{ name }</button>"
46
+ $tabButton.on "click", (e) =>
47
47
  @_on_tab_click($(e.currentTarget))
48
- e.preventDefault()
49
48
  return $tabButton
50
49
 
51
50
  _on_tab_click: ($link) ->
52
51
  index = @$tabs.children().index($link)
53
52
  @_activate_tab(index)
53
+ @$content.scrollTop(0)
54
+ @$content.trigger("scroll")
54
55
 
55
56
  _activate_tab: (index) ->
56
- @$tabs.children().removeClass('active')
57
+ @$tabs.children().removeClass("active")
57
58
  @$tabs.find(":nth-child(#{ index + 1 })").addClass('active')
58
59
 
59
60
  for g in @tabGroups
@@ -8,6 +8,7 @@ $desktop: "screen and (min-width:1024px)";
8
8
  *:after { box-sizing: border-box; }
9
9
  html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
10
10
  a { text-decoration: none; }
11
+ button { outline: none; }
11
12
  .spinner { @include spinner; }
12
13
 
13
14
  /* Menu -------------------------------------------------------------------- */
@@ -84,6 +85,12 @@ a { text-decoration: none; }
84
85
  .icon-reorder {
85
86
  @include item-icon-base;
86
87
  left: 0;
88
+
89
+ &:after {
90
+ @include position(absolute, 0 0 0 0);
91
+ content: "";
92
+ display: block;
93
+ }
87
94
  }
88
95
 
89
96
  .icon-folder {
@@ -165,10 +172,16 @@ a { text-decoration: none; }
165
172
  .header-tabs {
166
173
  @include position(relative, 0.45em null null null);
167
174
  border-radius : 4px;
168
- overflow: hidden;
169
175
  display: inline-block;
176
+ overflow: hidden;
170
177
 
171
- a { display : inline-block; }
178
+ button {
179
+ margin-right: 1px;
180
+
181
+ &:last-child {
182
+ margin-right: 0;
183
+ }
184
+ }
172
185
  }
173
186
 
174
187
  /* Mobile ------------------------------------------------------------------ */
@@ -117,27 +117,19 @@ a {
117
117
  }
118
118
 
119
119
  .header-tabs {
120
- border : 1px solid $positive-color;
120
+ background-color: $positive-color;
121
+ border: 1px solid $positive-color;
121
122
 
122
- a {
123
+ button {
123
124
  background-color: $white-color;
124
- border-right : 1px solid $positive-color;
125
- font-weight : $regular;
126
- line-height : 1;
127
- font-size : .8em;
128
- padding : .45em .75em .525em;
129
- color : $positive-color;
130
-
131
- &:last-child {
132
- border-right : none;
133
- }
125
+ border: 0;
126
+ color: $positive-color;
127
+ font-size: 0.8em;
128
+ padding: 0.45em 0.75em 0.525em;
134
129
 
135
130
  &.active {
136
- background-color: $positive-color;
131
+ background-color: transparent;
137
132
  color: $white-color;
138
- &:hover {
139
- color: $white-color;
140
- }
141
133
  }
142
134
  }
143
135
  }
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
3
- require 'chr/version'
4
- require 'date'
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "chr/version"
4
+ require "date"
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.required_ruby_version = ">= #{Chr::RUBY_VERSION}"
8
8
 
9
- s.authors = [ 'Alexander Kravets', 'Denis Popov', 'Roman Brazhnyk' ]
10
- s.email = 'alex@slatestudio.com'
11
- s.date = Date.today.strftime('%Y-%m-%d')
9
+ s.authors = [ "Alexander Kravets", "Denis Popov", "Roman Brazhnyk" ]
10
+ s.email = "alex@slatestudio.com"
11
+ s.date = Date.today.strftime("%Y-%m-%d")
12
12
 
13
13
  s.description = <<-DESC
14
14
  Character is a library written in CoffeeScript with a help of jQuery that allows to
@@ -16,39 +16,38 @@ build data management web applications in a fast and flexible way, e.g. CMS, new
16
16
  email client etc. It's responsive by default and designed to be data source independent.
17
17
  DESC
18
18
 
19
- s.name = 'chr'
20
- s.summary = 'Character is powerful responsive javascript-based CMS.'
21
- s.homepage = 'http://github.com/slate-studio/chr'
22
- s.extra_rdoc_files = %w[README.md LICENSE]
23
- s.license = 'MIT'
19
+ s.name = "chr"
20
+ s.summary = "Character is powerful responsive javascript-based CMS."
21
+ s.homepage = "http://github.com/slate-studio/chr"
22
+ s.extra_rdoc_files = %w[README.md LICENSE.md CONTRIBUTING.md]
23
+ s.license = "MIT"
24
24
  s.files = `git ls-files`.split("\n")
25
25
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
26
- s.require_paths = [ 'lib' ]
27
- s.executables = [ 'chr' ]
26
+ s.require_paths = [ "lib" ]
28
27
  s.version = Chr::VERSION
29
28
  s.platform = Gem::Platform::RUBY
30
29
 
31
- s.add_dependency 'rails', Chr::RAILS_VERSION
32
- s.add_dependency 'coffee-rails', '>= 4.0'
33
- s.add_dependency 'formagic', '>= 0.3.9'
34
- s.add_dependency 'jquery-rails'
35
- s.add_dependency 'sass-rails'
36
- s.add_dependency 'bourbon'
37
- s.add_dependency 'font-awesome-rails'
30
+ s.add_dependency "rails", Chr::RAILS_VERSION
31
+ s.add_dependency "coffee-rails", ">= 4.0"
32
+ s.add_dependency "formagic", ">= 0.3.10"
33
+ s.add_dependency "jquery-rails"
34
+ s.add_dependency "sass-rails"
35
+ s.add_dependency "bourbon"
36
+ s.add_dependency "font-awesome-rails"
38
37
 
39
38
  # tests
40
- s.add_development_dependency 'mongosteen', '>= 0.2'
41
- s.add_development_dependency 'ants', '>= 0.3'
42
- s.add_development_dependency 'carrierwave-mongoid'
43
- s.add_development_dependency 'mini_magick'
39
+ s.add_development_dependency "mongosteen", ">= 0.2"
40
+ s.add_development_dependency "ants", ">= 0.3"
41
+ s.add_development_dependency "carrierwave-mongoid"
42
+ s.add_development_dependency "mini_magick"
44
43
 
45
- s.add_development_dependency 'faker'
46
- s.add_development_dependency 'coveralls'
47
- s.add_development_dependency 'uglifier'
48
- s.add_development_dependency 'database_cleaner'
49
- s.add_development_dependency 'factory_girl_rails'
50
- s.add_development_dependency 'capybara-webkit'
51
- s.add_development_dependency 'capybara-screenshot'
52
- s.add_development_dependency 'selenium-webdriver'
53
- s.add_development_dependency 'minitest-reporters'
54
- end
44
+ s.add_development_dependency "faker"
45
+ s.add_development_dependency "coveralls"
46
+ s.add_development_dependency "uglifier"
47
+ s.add_development_dependency "database_cleaner"
48
+ s.add_development_dependency "factory_girl_rails"
49
+ s.add_development_dependency "capybara-webkit"
50
+ s.add_development_dependency "capybara-screenshot"
51
+ s.add_development_dependency "selenium-webdriver"
52
+ s.add_development_dependency "minitest-reporters"
53
+ end
data/lib/chr.rb CHANGED
@@ -1,19 +1,16 @@
1
- require 'chr/version'
2
- require 'chr/generators/app_generator'
3
- require 'chr/app_builder'
4
-
5
- require 'rails'
6
- require 'bourbon'
7
- require 'formagic'
8
- require 'jquery-rails'
9
- require 'coffee-rails'
10
- require 'sass-rails'
11
- require 'font-awesome-rails'
1
+ require "chr/version"
2
+ require "rails"
3
+ require "bourbon"
4
+ require "formagic"
5
+ require "jquery-rails"
6
+ require "coffee-rails"
7
+ require "sass-rails"
8
+ require "font-awesome-rails"
12
9
 
13
10
  module Chr
14
11
  if defined?(Rails) && defined?(Rails::Engine)
15
12
  class Engine < ::Rails::Engine
16
- require 'chr/engine'
13
+ require "chr/engine"
17
14
  end
18
15
  end
19
16
  end
@@ -1,5 +1,5 @@
1
1
  module Chr
2
2
  RAILS_VERSION = "~> 4.2.5"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "0.5.7"
4
+ VERSION = "0.5.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-23 00:00:00.000000000 Z
13
+ date: 2015-12-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 0.3.9
49
+ version: 0.3.10
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 0.3.9
56
+ version: 0.3.10
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: jquery-rails
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -297,12 +297,12 @@ description: |
297
297
  build data management web applications in a fast and flexible way, e.g. CMS, news reader,
298
298
  email client etc. It's responsive by default and designed to be data source independent.
299
299
  email: alex@slatestudio.com
300
- executables:
301
- - chr
300
+ executables: []
302
301
  extensions: []
303
302
  extra_rdoc_files:
304
303
  - README.md
305
- - LICENSE
304
+ - LICENSE.md
305
+ - CONTRIBUTING.md
306
306
  files:
307
307
  - ".coffeescript-style.json"
308
308
  - ".coveralls.yml"
@@ -314,7 +314,7 @@ files:
314
314
  - ".travis.yml"
315
315
  - CONTRIBUTING.md
316
316
  - Gemfile
317
- - LICENSE
317
+ - LICENSE.md
318
318
  - README.md
319
319
  - Rakefile
320
320
  - app/assets/javascripts/chr.coffee
@@ -339,60 +339,17 @@ files:
339
339
  - app/assets/javascripts/stores/rails-object.coffee
340
340
  - app/assets/javascripts/stores/rest-array.coffee
341
341
  - app/assets/javascripts/stores/rest-object.coffee
342
- - app/assets/javascripts/vendor/slip.js
343
342
  - app/assets/stylesheets/chr.scss
344
343
  - app/assets/stylesheets/chr/layout.scss
345
344
  - app/assets/stylesheets/chr/mixins.scss
346
345
  - app/assets/stylesheets/chr/themes/basic.scss
347
- - bin/chr
348
346
  - bin/rake
349
347
  - bin/setup
350
348
  - chr.gemspec
351
- - docs/bootstrap.md
352
- - docs/demo.png
353
- - docs/notes.md
354
- - docs/rails.md
355
349
  - docs/tests.md
356
350
  - lib/chr.rb
357
- - lib/chr/app_builder.rb
358
351
  - lib/chr/engine.rb
359
- - lib/chr/generators/app_generator.rb
360
352
  - lib/chr/version.rb
361
- - lib/generators/chr/controller_generator.rb
362
- - templates/Gemfile.erb
363
- - templates/Procfile
364
- - templates/README.md.erb
365
- - templates/_analytics.html.erb
366
- - templates/_flashes.html.erb
367
- - templates/_javascript.html.erb
368
- - templates/application.coffee
369
- - templates/application.scss
370
- - templates/application.yml
371
- - templates/application_gitignore
372
- - templates/application_layout.html.erb.erb
373
- - templates/bin_setup.erb
374
- - templates/body_class_helper.rb
375
- - templates/bundler_audit.rake
376
- - templates/carrierwave.rb
377
- - templates/character_admin.coffee.erb
378
- - templates/character_admin.scss
379
- - templates/character_admin_index.html.erb
380
- - templates/character_admin_layout.html.erb.erb
381
- - templates/character_base_controller.rb
382
- - templates/dev.rake
383
- - templates/devise_overrides_passwords_controller.rb
384
- - templates/devise_overrides_passwords_edit.html.erb
385
- - templates/devise_overrides_passwords_new.html.erb
386
- - templates/devise_overrides_sessions_controller.rb
387
- - templates/devise_overrides_sessions_new.html.erb
388
- - templates/errors.rb
389
- - templates/json_encoding.rb
390
- - templates/puma.rb
391
- - templates/routes.rb
392
- - templates/sample.env
393
- - templates/secrets.yml
394
- - templates/smtp.rb
395
- - templates/staging.rb
396
353
  - test/factories/article_factory.rb
397
354
  - test/files/test.jpg
398
355
  - test/integration/article_fullsize_test.rb