locomotivecms_wagon 3.0.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/bin/wagon +64 -3
  4. data/bin/wagon_dev +11 -0
  5. data/generators/.DS_Store +0 -0
  6. data/generators/blank/Gemfile.tt +6 -2
  7. data/generators/blank/app/assets/stylesheets/app.scss +2 -0
  8. data/generators/blank/app/assets/stylesheets/sections/.empty_directory +1 -0
  9. data/generators/blank/app/views/pages/404.liquid +1 -1
  10. data/generators/blank/app/views/pages/index.liquid +1 -1
  11. data/generators/section/%type%.scss.tt +3 -0
  12. data/generators/section/template.liquid.tt +139 -80
  13. data/generators/webpack/app/assets/javascripts/.DS_Store +0 -0
  14. data/lib/locomotive/wagon.rb +15 -1
  15. data/lib/locomotive/wagon/cli.rb +11 -11
  16. data/lib/locomotive/wagon/commands/generate_command.rb +2 -7
  17. data/lib/locomotive/wagon/commands/push_command.rb +4 -8
  18. data/lib/locomotive/wagon/commands/serve_command.rb +5 -5
  19. data/lib/locomotive/wagon/generators/section.rb +121 -17
  20. data/lib/locomotive/wagon/generators/site/base.rb +0 -23
  21. data/lib/locomotive/wagon/version.rb +1 -1
  22. data/locomotivecms_wagon.gemspec +7 -4
  23. metadata +14 -233
  24. data/.gitignore +0 -36
  25. data/.rspec +0 -1
  26. data/.travis.yml +0 -11
  27. data/Gemfile +0 -30
  28. data/Rakefile +0 -32
  29. data/spec/fixtures/blog/app/content_types/comments.yml +0 -20
  30. data/spec/fixtures/blog/app/content_types/posts.yml +0 -19
  31. data/spec/fixtures/blog/app/views/pages/404.liquid +0 -11
  32. data/spec/fixtures/blog/app/views/pages/about-us.liquid.haml +0 -29
  33. data/spec/fixtures/blog/app/views/pages/index.liquid +0 -25
  34. data/spec/fixtures/blog/app/views/pages/posts.fr.liquid +0 -13
  35. data/spec/fixtures/blog/app/views/pages/posts.liquid +0 -13
  36. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid +0 -14
  37. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid +0 -15
  38. data/spec/fixtures/blog/config/deploy.yml +0 -4
  39. data/spec/fixtures/blog/config/site.yml +0 -16
  40. data/spec/fixtures/blog/data/comments.yml +0 -16
  41. data/spec/fixtures/blog/data/posts.yml +0 -7
  42. data/spec/fixtures/cassettes/authenticate.yml +0 -236
  43. data/spec/fixtures/cassettes/delete.yml +0 -1255
  44. data/spec/fixtures/cassettes/push.yml +0 -9946
  45. data/spec/fixtures/cassettes/sync.yml +0 -11462
  46. data/spec/fixtures/default/README +0 -0
  47. data/spec/fixtures/default/app/content_types/bands.yml +0 -21
  48. data/spec/fixtures/default/app/content_types/events.yml +0 -25
  49. data/spec/fixtures/default/app/content_types/messages.yml +0 -17
  50. data/spec/fixtures/default/app/content_types/songs.yml +0 -25
  51. data/spec/fixtures/default/app/content_types/updates.yml +0 -33
  52. data/spec/fixtures/default/app/views/pages/404.liquid.haml +0 -10
  53. data/spec/fixtures/default/app/views/pages/about_us.fr.liquid.haml +0 -7
  54. data/spec/fixtures/default/app/views/pages/about_us.liquid.haml +0 -21
  55. data/spec/fixtures/default/app/views/pages/about_us.nb.liquid.haml +0 -4
  56. data/spec/fixtures/default/app/views/pages/about_us/jane_doe.liquid.haml +0 -4
  57. data/spec/fixtures/default/app/views/pages/about_us/john_doe.fr.liquid.haml +0 -5
  58. data/spec/fixtures/default/app/views/pages/about_us/john_doe.liquid.haml +0 -6
  59. data/spec/fixtures/default/app/views/pages/all.liquid.haml +0 -16
  60. data/spec/fixtures/default/app/views/pages/archives/news.liquid.haml +0 -10
  61. data/spec/fixtures/default/app/views/pages/contact.liquid.haml +0 -54
  62. data/spec/fixtures/default/app/views/pages/contest.liquid.haml +0 -18
  63. data/spec/fixtures/default/app/views/pages/events.liquid.haml +0 -64
  64. data/spec/fixtures/default/app/views/pages/filtered.liquid.haml +0 -20
  65. data/spec/fixtures/default/app/views/pages/grunge_bands.liquid.haml +0 -8
  66. data/spec/fixtures/default/app/views/pages/index.fr.liquid.haml +0 -3
  67. data/spec/fixtures/default/app/views/pages/index.liquid.haml +0 -101
  68. data/spec/fixtures/default/app/views/pages/layouts/simple.liquid.haml +0 -13
  69. data/spec/fixtures/default/app/views/pages/music.fr.liquid.haml +0 -4
  70. data/spec/fixtures/default/app/views/pages/music.liquid.haml +0 -42
  71. data/spec/fixtures/default/app/views/pages/songs/template.fr.liquid.haml +0 -16
  72. data/spec/fixtures/default/app/views/pages/songs/template.liquid.haml +0 -18
  73. data/spec/fixtures/default/app/views/pages/songs/template/band.liquid.haml +0 -16
  74. data/spec/fixtures/default/app/views/pages/store.fr.liquid.haml +0 -5
  75. data/spec/fixtures/default/app/views/pages/store.liquid +0 -5
  76. data/spec/fixtures/default/app/views/pages/tags/nav.liquid.haml +0 -6
  77. data/spec/fixtures/default/app/views/pages/tags/nav_in_deep.liquid.haml +0 -6
  78. data/spec/fixtures/default/app/views/pages/unlisted_pages.liquid.haml +0 -9
  79. data/spec/fixtures/default/app/views/snippets/A_Complicated-one.liquid.haml +0 -1
  80. data/spec/fixtures/default/app/views/snippets/footer.liquid.haml +0 -6
  81. data/spec/fixtures/default/app/views/snippets/header.liquid.haml +0 -1
  82. data/spec/fixtures/default/app/views/snippets/song.fr.liquid.haml +0 -8
  83. data/spec/fixtures/default/app/views/snippets/song.liquid +0 -12
  84. data/spec/fixtures/default/config/autoprefixer.yml +0 -2
  85. data/spec/fixtures/default/config/deploy.yml +0 -12
  86. data/spec/fixtures/default/config/deploy_example.yml +0 -12
  87. data/spec/fixtures/default/config/site.yml +0 -13
  88. data/spec/fixtures/default/config/translations.yml +0 -3
  89. data/spec/fixtures/default/data/bands.yml +0 -13
  90. data/spec/fixtures/default/data/events.yml +0 -54
  91. data/spec/fixtures/default/data/songs.yml +0 -46
  92. data/spec/fixtures/default/data/updates.yml +0 -48
  93. data/spec/fixtures/default/icon.png +0 -0
  94. data/spec/fixtures/default/public/fonts/chunkfive-webfont.eot +0 -0
  95. data/spec/fixtures/default/public/fonts/chunkfive-webfont.svg +0 -213
  96. data/spec/fixtures/default/public/fonts/chunkfive-webfont.ttf +0 -0
  97. data/spec/fixtures/default/public/fonts/chunkfive-webfont.woff +0 -0
  98. data/spec/fixtures/default/public/fonts/chunkfive.css +0 -8
  99. data/spec/fixtures/default/public/fonts/chunkfive.otf +0 -0
  100. data/spec/fixtures/default/public/images/nav_on.png +0 -0
  101. data/spec/fixtures/default/public/images/photo_frame.png +0 -0
  102. data/spec/fixtures/default/public/images/sep.png +0 -0
  103. data/spec/fixtures/default/public/images/top.jpg +0 -0
  104. data/spec/fixtures/default/public/javascripts/application.js.coffee +0 -2
  105. data/spec/fixtures/default/public/javascripts/common.js +0 -1
  106. data/spec/fixtures/default/public/samples/asset_collections/cover.jpg +0 -0
  107. data/spec/fixtures/default/public/samples/photo.jpg +0 -0
  108. data/spec/fixtures/default/public/samples/photo_2.jpg +0 -0
  109. data/spec/fixtures/default/public/stylesheets/application.css +0 -64
  110. data/spec/fixtures/default/public/stylesheets/other/extra.css.less +0 -8
  111. data/spec/fixtures/default/public/stylesheets/other/style.css.scss +0 -13
  112. data/spec/fixtures/default/public/stylesheets/reboot.css +0 -77
  113. data/spec/integration/cli_spec.rb +0 -17
  114. data/spec/integration/commands/authenticate_command_spec.rb +0 -60
  115. data/spec/integration/commands/delete_command_spec.rb +0 -147
  116. data/spec/integration/commands/push_command_spec.rb +0 -86
  117. data/spec/integration/commands/sync_command_spec.rb +0 -60
  118. data/spec/integration/generators/page_spec.rb +0 -87
  119. data/spec/integration/generators/relationship_spec.rb +0 -102
  120. data/spec/integration/integration_helper.rb +0 -15
  121. data/spec/spec_helper.rb +0 -19
  122. data/spec/support/api_settings.rb +0 -5
  123. data/spec/support/chronic.rb +0 -6
  124. data/spec/support/helpers.rb +0 -39
  125. data/spec/support/matchers.rb +0 -5
  126. data/spec/support/pry.rb +0 -4
  127. data/spec/support/thor.rb +0 -12
  128. data/spec/support/vcr.rb +0 -27
  129. data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +0 -48
  130. data/spec/unit/commands/pull_sub_commands/pull_content_types_command_spec.rb +0 -41
  131. data/spec/unit/commands/push_sub_commands/push_pages_command_spec.rb +0 -125
  132. data/spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb +0 -42
  133. data/spec/unit/decorators/content_entry_decorator_spec.rb +0 -104
  134. data/spec/unit/decorators/page_decorator_spec.rb +0 -35
  135. data/spec/unit/decorators/site_decorator_spec.rb +0 -62
  136. data/spec/unit/decorators/theme_asset_decorator_spec.rb +0 -89
  137. data/spec/unit/tools/glob_spec.rb +0 -26
  138. data/spec/unit/tools/yaml_ext_spec.rb +0 -46
@@ -148,19 +148,22 @@ module Locomotive
148
148
  end
149
149
  end
150
150
 
151
- desc 'section SLUG', 'Create a section'
151
+ desc 'section SLUG SETTINGS', 'Create a section'
152
152
  long_desc <<-LONGDESC
153
153
  Create a section. The generator will ask if the section is global or not.
154
154
 
155
155
  Example:
156
156
 
157
157
  * wagon generate section hero
158
+ * wagon generate section carousel -i slide title:text block:slide:title:text block:slide:image:image_picker
158
159
  LONGDESC
159
- def section(slug)
160
+ method_option :global, aliases: '-g', type: 'boolean', default: nil, desc: 'tell if the section is global'
161
+ method_option :icon, aliases: '-i', type: 'string', default: nil, desc: 'icon displayed the back-office'
162
+ def section(slug, *settings)
160
163
  force_color_if_asked(options)
161
164
 
162
165
  if path = check_path!
163
- Locomotive::Wagon.generate :section, [slug, '', '', path], self.options
166
+ Locomotive::Wagon.generate :section, [slug, settings, path], self.options
164
167
  end
165
168
  end
166
169
 
@@ -233,7 +236,6 @@ module Locomotive
233
236
 
234
237
  desc 'init NAME [PATH] [GENERATOR_OPTIONS]', 'Create a brand new site'
235
238
  method_option :lib, aliases: '-l', type: 'string', desc: 'Path to an external ruby lib or generator'
236
- method_option :skip_bundle, type: 'boolean', default: true, desc: "Don't run bundle install"
237
239
  method_option :verbose, aliases: '-v', type: 'boolean', default: false, desc: 'display the full error stack trace if an error occurs'
238
240
  def init(name, path = '.', *generator_options)
239
241
  force_color_if_asked(options)
@@ -245,8 +247,8 @@ module Locomotive
245
247
  exit(1)
246
248
  else
247
249
  begin
248
- if Locomotive::Wagon.init(generator.klass, [name, path, options[:skip_bundle].to_s, *generator_options], { force_color: options[:force_color] })
249
- self.print_next_instructions_when_site_created(name, path, options[:skip_bundle])
250
+ if Locomotive::Wagon.init(generator.klass, [name, path, *generator_options], { force_color: options[:force_color] })
251
+ self.print_next_instructions_when_site_created(name, path)
250
252
  end
251
253
  rescue GeneratorException => e
252
254
  self.print_exception(e, options[:verbose])
@@ -412,16 +414,14 @@ module Locomotive
412
414
  #
413
415
  # @param [ String ] name The name of the site
414
416
  # @param [ String ] path The path of the local site
415
- # @param [ Boolean ] skip_bundle Do not run bundle install
416
417
  #
417
- def print_next_instructions_when_site_created(name, path, skip_bundle)
418
+ def print_next_instructions_when_site_created(name, path)
418
419
  say "\nCongratulations, your site \"#{name}\" has been created successfully !", :green
419
420
  say "\nNext steps:\n", :bold
420
421
  say "\n# Run the local web server", :on_blue
421
422
  say "\n\tcd #{path}/#{name}"
422
- say "\tbundle install" unless skip_bundle
423
- say "\t#{'bundle exec ' unless skip_bundle}wagon serve"
424
- say "\n# Compile assets (in a another terminal)", :on_blue
423
+ say "\twagon serve"
424
+ say "\n# Compile assets (in a another terminal, use tmux for instance)", :on_blue
425
425
  say "\n\tyarn"
426
426
  say "\tyarn start"
427
427
  say "\n# Preview your site!", :on_blue
@@ -7,13 +7,8 @@ module Locomotive::Wagon
7
7
  end
8
8
 
9
9
  def generate
10
- begin
11
- ::Bundler.require 'misc'
12
- rescue Exception => e
13
- # Bundler is not defined or there is an issue
14
- # with one of the gems in the misc group
15
- end
16
-
10
+ Locomotive::Wagon.require_misc_gems
11
+
17
12
  generator = generator_klass.new(args, options, { behavior: :skip })
18
13
  generator.destination_root = args.last
19
14
  generator.force_color_if_asked(options)
@@ -32,7 +32,9 @@ module Locomotive::Wagon
32
32
  end
33
33
 
34
34
  def push
35
- require_misc_gems
35
+ require 'haml'
36
+
37
+ Locomotive::Wagon.require_misc_gems
36
38
 
37
39
  api_client = build_api_site_client(connection_information)
38
40
 
@@ -176,13 +178,7 @@ module Locomotive::Wagon
176
178
 
177
179
  _site = Locomotive::Steam::Site.new(attributes)
178
180
  @remote_site = RemoteSiteDecorator.new(_site)
179
- end
180
-
181
- def require_misc_gems
182
- require 'haml'
183
- require 'bundler'
184
- Bundler.require 'misc'
185
- end
181
+ end
186
182
 
187
183
  def ask_for_performing(message)
188
184
  shell.say(message, :yellow)
@@ -24,6 +24,9 @@ module Locomotive::Wagon
24
24
  # Steam is our rendering engine
25
25
  require_steam
26
26
 
27
+ # in case the developer installed custom libs
28
+ Locomotive::Wagon.require_misc_gems
29
+
27
30
  setup_signals
28
31
 
29
32
  show_start_message
@@ -63,8 +66,7 @@ module Locomotive::Wagon
63
66
  require 'haml'
64
67
  require 'locomotive/steam'
65
68
  require 'locomotive/steam/server'
66
- require 'locomotive/wagon/middlewares/error_page'
67
- require 'bundler'
69
+ require 'locomotive/wagon/middlewares/error_page'
68
70
 
69
71
  configure_logger
70
72
 
@@ -85,9 +87,7 @@ module Locomotive::Wagon
85
87
  end
86
88
  end
87
89
  }
88
- end
89
-
90
- Bundler.require 'misc'
90
+ end
91
91
  end
92
92
 
93
93
  def listen
@@ -1,4 +1,5 @@
1
1
  require 'thor/group'
2
+ require 'faker'
2
3
  require 'active_support'
3
4
  require 'active_support/core_ext'
4
5
 
@@ -19,44 +20,67 @@ module Locomotive
19
20
  include Locomotive::Wagon::CLI::ForceColor
20
21
 
21
22
  argument :slug
22
- argument :global
23
- argument :icon
23
+ argument :settings
24
24
  argument :target_path # path to the site
25
25
 
26
26
  def is_global?
27
- if self.global.blank?
28
- self.global = yes?('Is this section aimed to be used as global (same content for all the pages)?')
27
+ if (@global = self.options[:global]).nil?
28
+ @global = yes?('Is this section aimed to be used as global (same content for all the pages)?')
29
29
  end
30
30
  end
31
31
 
32
32
  def which_icon?
33
- if self.icon.blank?
33
+ if (@icon = self.options[:icon]).nil?
34
34
  question = 'Which icon should be displayed in the editor UI?'
35
- self.icon = ask(question, limited_to: ICON_LIST)
35
+ @icon = ask(question, limited_to: ICON_LIST)
36
36
  end
37
37
  end
38
38
 
39
- def create_section
40
- _slug = slug.clone.downcase.gsub(/[-]/, '_')
41
- options = { name: _slug.humanize, type: _slug, global: self.global, icon: self.icon, all_icons: ICON_LIST }
39
+ def build_options
40
+ @_slug = slug.clone.downcase.gsub(/[-]/, '_')
41
+ @options = {
42
+ name: @_slug.humanize,
43
+ type: @_slug,
44
+ global: @global,
45
+ icon: @icon,
46
+ settings: extract_section_settings,
47
+ blocks: extra_blocks,
48
+ all_icons: ICON_LIST
49
+ }
50
+ end
42
51
 
52
+ def create_section
43
53
  # create the liquid file
44
- file_path = File.join(sections_path, _slug)
45
- template "template.liquid.tt", "#{file_path}.liquid", options
54
+ file_path = File.join(sections_path, @_slug)
55
+ template "template.liquid.tt", "#{file_path}.liquid", @options
56
+ end
46
57
 
47
- # create the javascript file
58
+ def create_javascript_file
48
59
  if File.exists?(sections_js_path)
49
- js_class_name = options[:type].classify
50
- file_path = File.join(sections_js_path, options[:type])
60
+ js_class_name = @options[:type].classify
61
+ file_path = File.join(sections_js_path, @options[:type])
51
62
 
52
- template "%type%.js.tt", "#{file_path}.js", options
63
+ template "%type%.js.tt", "#{file_path}.js", @options
53
64
 
54
65
  append_to_file File.join(sections_js_path, 'index.js'), <<-JS
55
- export { default as #{js_class_name} } from './#{options[:type]}';
66
+ export { default as #{js_class_name} } from './#{@options[:type]}';
56
67
  JS
57
68
 
58
69
  insert_into_file 'app/assets/javascripts/app.js', after: "// Register sections here. DO NOT REMOVE OR UPDATE THIS LINE\n" do
59
- " sectionsManager.registerSection('#{options[:type]}', Sections.#{js_class_name});\n"
70
+ " sectionsManager.registerSection('#{@options[:type]}', Sections.#{js_class_name});\n"
71
+ end
72
+ end
73
+ end
74
+
75
+ def create_stylesheet_file
76
+ if File.exists?(sections_css_path)
77
+ css_class_name = "#{@options[:type].dasherize}-section"
78
+ file_path = File.join(sections_css_path, @options[:type])
79
+
80
+ template "%type%.scss.tt", "#{file_path}.scss", @options
81
+
82
+ insert_into_file 'app/assets/stylesheets/app.scss', after: "// Register sections here. DO NOT REMOVE OR UPDATE THIS LINE\n" do
83
+ "@import 'sections/#{@options[:type]}';\n"
60
84
  end
61
85
  end
62
86
  end
@@ -75,6 +99,86 @@ export { default as #{js_class_name} } from './#{options[:type]}';
75
99
  File.join(target_path, 'app', 'assets', 'javascripts', 'sections')
76
100
  end
77
101
 
102
+ def sections_css_path
103
+ File.join(target_path, 'app', 'assets', 'stylesheets', 'sections')
104
+ end
105
+
106
+ def extract_section_settings
107
+ # build section settings only
108
+ settings.map do |raw_setting|
109
+ next if raw_setting.starts_with?('block:') # block setting
110
+ id, type = raw_setting.split(':')
111
+ SectionSetting.new(id, type)
112
+ end.compact.presence || default_section_settings
113
+ end
114
+
115
+ def extra_blocks
116
+ # build block settings
117
+ _settings = settings.map do |raw_setting|
118
+ next unless raw_setting.starts_with?('block:') # block setting
119
+ _, block_type, id, type = raw_setting.split(':')
120
+ BlockSetting.new(block_type, id, type)
121
+ end.compact.presence || []
122
+
123
+ if settings.blank?
124
+ _settings = default_block_settings
125
+ end
126
+
127
+ # group them by block types
128
+ _settings.group_by { |setting| setting.block_type }
129
+ end
130
+
131
+ def default_section_settings
132
+ [
133
+ SectionSetting.new('title', 'text', 'My awesome title'),
134
+ SectionSetting.new('image', 'image_picker', 'An image')
135
+ ]
136
+ end
137
+
138
+ def default_block_settings
139
+ [
140
+ BlockSetting.new('list_item', 'title', 'text', 'Item title'),
141
+ BlockSetting.new('list_item', 'image', 'image_picker', 'Item image')
142
+ ]
143
+ end
144
+
145
+ end
146
+
147
+ class SectionSetting
148
+
149
+ attr_reader :id, :type, :label
150
+
151
+ def initialize(id, type, label = nil)
152
+ @id, @type, @label = id, type || 'text', label || id.humanize
153
+ end
154
+
155
+ def default
156
+ case type
157
+ when 'text' then "\"#{Faker::Lorem.sentence}\""
158
+ when 'image_picker' then "\"/samples/images/default.svg\""
159
+ when 'checkbox' then true
160
+ when 'radio', 'select' then 'option_1'
161
+ when 'url' then "\"#\""
162
+ else
163
+ nil
164
+ end
165
+ end
166
+
167
+ def has_value?
168
+ !%w(hint content_type).include?(type)
169
+ end
170
+
171
+ end
172
+
173
+ class BlockSetting < SectionSetting
174
+
175
+ attr_reader :block_type
176
+
177
+ def initialize(block_type, id, type, label = nil)
178
+ super(id, type, label)
179
+ @block_type = block_type
180
+ end
181
+
78
182
  end
79
183
 
80
184
  end
@@ -16,18 +16,11 @@ module Locomotive
16
16
 
17
17
  argument :name
18
18
  argument :target_path
19
- argument :skip_bundle
20
19
 
21
20
  def copy_sources
22
21
  copy_sources_from_generator
23
22
  end
24
23
 
25
- def remove_gemfile
26
- return unless skip_bundle?
27
-
28
- remove_file File.join(self.destination, 'Gemfile')
29
- end
30
-
31
24
  def self.source_root
32
25
  File.join(File.dirname(__FILE__), '..', '..', '..', '..', '..', 'generators')
33
26
  end
@@ -48,22 +41,6 @@ module Locomotive
48
41
  File.join(target_path, name)
49
42
  end
50
43
 
51
- def skip_bundle?
52
- [true, 'true'].include?(skip_bundle)
53
- end
54
-
55
- def bundle_install
56
- return if skip_bundle?
57
-
58
- FileUtils.cd self.destination
59
-
60
- say_status :run, "bundle install"
61
-
62
- ENV['BUNDLE_GEMFILE'] = nil
63
-
64
- print `"#{Gem.ruby}" -rubygems "#{Gem.bin_path('bundler', 'bundle')}" install`
65
- end
66
-
67
44
  end
68
45
 
69
46
  end
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.2'
4
4
  end
5
5
  end
@@ -8,12 +8,15 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Locomotive::Wagon::VERSION
9
9
  gem.authors = ['Didier Lafforgue', 'Rodrigo Alvarez']
10
10
  gem.email = ['did@locomotivecms.com', 'papipo@gmail.com']
11
- gem.description = %q{The LocomotiveCMS wagon is a site generator for the LocomotiveCMS engine}
12
- gem.summary = %q{The LocomotiveCMS wagon is a site generator for the LocomotiveCMS engine powered by all the efficient and modern HTML development tools (SASS, Webpack, ...etc).}
13
- gem.homepage = 'http://www.locomotivecms.com'
11
+ gem.description = %q{Wagon is a site generator for the LocomotiveCMS engine}
12
+ gem.summary = %q{Wagon is a site generator for the LocomotiveCMS engine powered by all the efficient and modern HTML development tools (SASS, Webpack, ...etc).}
13
+ gem.homepage = 'https://www.locomotivecms.com'
14
14
  gem.license = 'MIT'
15
15
 
16
- gem.files = `git ls-files`.split($/)
16
+ gem.files = Dir['bin/*'] +
17
+ Dir.glob('generators/**/*', File::FNM_DOTMATCH) +
18
+ Dir['lib/**/*.rb'] +
19
+ %w(locomotivecms_wagon.gemspec MIT-LICENSE README.md)
17
20
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
21
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
22
  gem.require_paths = ['lib']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_wagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-20 00:00:00.000000000 Z
12
+ date: 2019-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -179,7 +179,7 @@ dependencies:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
181
  version: '1.6'
182
- description: The LocomotiveCMS wagon is a site generator for the LocomotiveCMS engine
182
+ description: Wagon is a site generator for the LocomotiveCMS engine
183
183
  email:
184
184
  - did@locomotivecms.com
185
185
  - papipo@gmail.com
@@ -188,14 +188,11 @@ executables:
188
188
  extensions: []
189
189
  extra_rdoc_files: []
190
190
  files:
191
- - ".gitignore"
192
- - ".rspec"
193
- - ".travis.yml"
194
- - Gemfile
195
191
  - MIT-LICENSE
196
192
  - README.md
197
- - Rakefile
198
193
  - bin/wagon
194
+ - bin/wagon_dev
195
+ - generators/.DS_Store
199
196
  - generators/blank/.gitignore
200
197
  - generators/blank/Gemfile.tt
201
198
  - generators/blank/app/assets/.babelrc
@@ -205,6 +202,7 @@ files:
205
202
  - generators/blank/app/assets/javascripts/sections/index.js
206
203
  - generators/blank/app/assets/postcss.config.js
207
204
  - generators/blank/app/assets/stylesheets/app.scss
205
+ - generators/blank/app/assets/stylesheets/sections/.empty_directory
208
206
  - generators/blank/app/assets/webpack.common.js
209
207
  - generators/blank/app/assets/webpack.dev.js
210
208
  - generators/blank/app/assets/webpack.prod.js
@@ -223,6 +221,7 @@ files:
223
221
  - generators/blank/public/fonts/.empty_directory
224
222
  - generators/blank/public/images/.empty_directory
225
223
  - generators/blank/public/javascripts/.empty_directory
224
+ - generators/blank/public/samples/.DS_Store
226
225
  - generators/blank/public/samples/.empty_directory
227
226
  - generators/blank/public/samples/images/default.svg
228
227
  - generators/blank/public/stylesheets/.empty_directory
@@ -243,11 +242,13 @@ files:
243
242
  - generators/public_form/content_type.yml.tt
244
243
  - generators/public_form/page.liquid.tt
245
244
  - generators/section/%type%.js.tt
245
+ - generators/section/%type%.scss.tt
246
246
  - generators/section/template.liquid.tt
247
247
  - generators/site_metafields/schema.yml.tt
248
248
  - generators/snippet/template.liquid.tt
249
249
  - generators/webpack/app/assets/.babelrc
250
250
  - generators/webpack/app/assets/fonts/.empty_directory
251
+ - generators/webpack/app/assets/javascripts/.DS_Store
251
252
  - generators/webpack/app/assets/javascripts/app.js
252
253
  - generators/webpack/app/assets/javascripts/sections/_manager.js
253
254
  - generators/webpack/app/assets/javascripts/sections/index.js
@@ -338,117 +339,7 @@ files:
338
339
  - lib/locomotive/wagon/tools/yaml_ext.rb
339
340
  - lib/locomotive/wagon/version.rb
340
341
  - locomotivecms_wagon.gemspec
341
- - spec/fixtures/blog/app/content_types/comments.yml
342
- - spec/fixtures/blog/app/content_types/posts.yml
343
- - spec/fixtures/blog/app/views/pages/404.liquid
344
- - spec/fixtures/blog/app/views/pages/about-us.liquid.haml
345
- - spec/fixtures/blog/app/views/pages/index.liquid
346
- - spec/fixtures/blog/app/views/pages/posts.fr.liquid
347
- - spec/fixtures/blog/app/views/pages/posts.liquid
348
- - spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid
349
- - spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid
350
- - spec/fixtures/blog/config/deploy.yml
351
- - spec/fixtures/blog/config/site.yml
352
- - spec/fixtures/blog/data/comments.yml
353
- - spec/fixtures/blog/data/posts.yml
354
- - spec/fixtures/cassettes/authenticate.yml
355
- - spec/fixtures/cassettes/delete.yml
356
- - spec/fixtures/cassettes/push.yml
357
- - spec/fixtures/cassettes/sync.yml
358
- - spec/fixtures/default/README
359
- - spec/fixtures/default/app/content_types/bands.yml
360
- - spec/fixtures/default/app/content_types/events.yml
361
- - spec/fixtures/default/app/content_types/messages.yml
362
- - spec/fixtures/default/app/content_types/songs.yml
363
- - spec/fixtures/default/app/content_types/updates.yml
364
- - spec/fixtures/default/app/views/pages/404.liquid.haml
365
- - spec/fixtures/default/app/views/pages/about_us.fr.liquid.haml
366
- - spec/fixtures/default/app/views/pages/about_us.liquid.haml
367
- - spec/fixtures/default/app/views/pages/about_us.nb.liquid.haml
368
- - spec/fixtures/default/app/views/pages/about_us/jane_doe.liquid.haml
369
- - spec/fixtures/default/app/views/pages/about_us/john_doe.fr.liquid.haml
370
- - spec/fixtures/default/app/views/pages/about_us/john_doe.liquid.haml
371
- - spec/fixtures/default/app/views/pages/all.liquid.haml
372
- - spec/fixtures/default/app/views/pages/archives/news.liquid.haml
373
- - spec/fixtures/default/app/views/pages/contact.liquid.haml
374
- - spec/fixtures/default/app/views/pages/contest.liquid.haml
375
- - spec/fixtures/default/app/views/pages/events.liquid.haml
376
- - spec/fixtures/default/app/views/pages/filtered.liquid.haml
377
- - spec/fixtures/default/app/views/pages/grunge_bands.liquid.haml
378
- - spec/fixtures/default/app/views/pages/index.fr.liquid.haml
379
- - spec/fixtures/default/app/views/pages/index.liquid.haml
380
- - spec/fixtures/default/app/views/pages/layouts/simple.liquid.haml
381
- - spec/fixtures/default/app/views/pages/music.fr.liquid.haml
382
- - spec/fixtures/default/app/views/pages/music.liquid.haml
383
- - spec/fixtures/default/app/views/pages/songs/template.fr.liquid.haml
384
- - spec/fixtures/default/app/views/pages/songs/template.liquid.haml
385
- - spec/fixtures/default/app/views/pages/songs/template/band.liquid.haml
386
- - spec/fixtures/default/app/views/pages/store.fr.liquid.haml
387
- - spec/fixtures/default/app/views/pages/store.liquid
388
- - spec/fixtures/default/app/views/pages/tags/nav.liquid.haml
389
- - spec/fixtures/default/app/views/pages/tags/nav_in_deep.liquid.haml
390
- - spec/fixtures/default/app/views/pages/unlisted_pages.liquid.haml
391
- - spec/fixtures/default/app/views/snippets/A_Complicated-one.liquid.haml
392
- - spec/fixtures/default/app/views/snippets/footer.liquid.haml
393
- - spec/fixtures/default/app/views/snippets/header.liquid.haml
394
- - spec/fixtures/default/app/views/snippets/song.fr.liquid.haml
395
- - spec/fixtures/default/app/views/snippets/song.liquid
396
- - spec/fixtures/default/config/autoprefixer.yml
397
- - spec/fixtures/default/config/deploy.yml
398
- - spec/fixtures/default/config/deploy_example.yml
399
- - spec/fixtures/default/config/site.yml
400
- - spec/fixtures/default/config/translations.yml
401
- - spec/fixtures/default/data/bands.yml
402
- - spec/fixtures/default/data/events.yml
403
- - spec/fixtures/default/data/songs.yml
404
- - spec/fixtures/default/data/updates.yml
405
- - spec/fixtures/default/icon.png
406
- - spec/fixtures/default/public/fonts/chunkfive-webfont.eot
407
- - spec/fixtures/default/public/fonts/chunkfive-webfont.svg
408
- - spec/fixtures/default/public/fonts/chunkfive-webfont.ttf
409
- - spec/fixtures/default/public/fonts/chunkfive-webfont.woff
410
- - spec/fixtures/default/public/fonts/chunkfive.css
411
- - spec/fixtures/default/public/fonts/chunkfive.otf
412
- - spec/fixtures/default/public/images/nav_on.png
413
- - spec/fixtures/default/public/images/photo_frame.png
414
- - spec/fixtures/default/public/images/sep.png
415
- - spec/fixtures/default/public/images/top.jpg
416
- - spec/fixtures/default/public/javascripts/application.js.coffee
417
- - spec/fixtures/default/public/javascripts/common.js
418
- - spec/fixtures/default/public/samples/asset_collections/cover.jpg
419
- - spec/fixtures/default/public/samples/photo.jpg
420
- - spec/fixtures/default/public/samples/photo_2.jpg
421
- - spec/fixtures/default/public/stylesheets/application.css
422
- - spec/fixtures/default/public/stylesheets/other/extra.css.less
423
- - spec/fixtures/default/public/stylesheets/other/style.css.scss
424
- - spec/fixtures/default/public/stylesheets/reboot.css
425
- - spec/integration/cli_spec.rb
426
- - spec/integration/commands/authenticate_command_spec.rb
427
- - spec/integration/commands/delete_command_spec.rb
428
- - spec/integration/commands/push_command_spec.rb
429
- - spec/integration/commands/sync_command_spec.rb
430
- - spec/integration/generators/page_spec.rb
431
- - spec/integration/generators/relationship_spec.rb
432
- - spec/integration/integration_helper.rb
433
- - spec/spec_helper.rb
434
- - spec/support/api_settings.rb
435
- - spec/support/chronic.rb
436
- - spec/support/helpers.rb
437
- - spec/support/matchers.rb
438
- - spec/support/pry.rb
439
- - spec/support/thor.rb
440
- - spec/support/vcr.rb
441
- - spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb
442
- - spec/unit/commands/pull_sub_commands/pull_content_types_command_spec.rb
443
- - spec/unit/commands/push_sub_commands/push_pages_command_spec.rb
444
- - spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb
445
- - spec/unit/decorators/content_entry_decorator_spec.rb
446
- - spec/unit/decorators/page_decorator_spec.rb
447
- - spec/unit/decorators/site_decorator_spec.rb
448
- - spec/unit/decorators/theme_asset_decorator_spec.rb
449
- - spec/unit/tools/glob_spec.rb
450
- - spec/unit/tools/yaml_ext_spec.rb
451
- homepage: http://www.locomotivecms.com
342
+ homepage: https://www.locomotivecms.com
452
343
  licenses:
453
344
  - MIT
454
345
  metadata: {}
@@ -467,119 +358,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
467
358
  - !ruby/object:Gem::Version
468
359
  version: '0'
469
360
  requirements: []
470
- rubygems_version: 3.0.3
361
+ rubygems_version: 3.0.6
471
362
  signing_key:
472
363
  specification_version: 4
473
- summary: The LocomotiveCMS wagon is a site generator for the LocomotiveCMS engine
474
- powered by all the efficient and modern HTML development tools (SASS, Webpack, ...etc).
475
- test_files:
476
- - spec/fixtures/blog/app/content_types/comments.yml
477
- - spec/fixtures/blog/app/content_types/posts.yml
478
- - spec/fixtures/blog/app/views/pages/404.liquid
479
- - spec/fixtures/blog/app/views/pages/about-us.liquid.haml
480
- - spec/fixtures/blog/app/views/pages/index.liquid
481
- - spec/fixtures/blog/app/views/pages/posts.fr.liquid
482
- - spec/fixtures/blog/app/views/pages/posts.liquid
483
- - spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid
484
- - spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid
485
- - spec/fixtures/blog/config/deploy.yml
486
- - spec/fixtures/blog/config/site.yml
487
- - spec/fixtures/blog/data/comments.yml
488
- - spec/fixtures/blog/data/posts.yml
489
- - spec/fixtures/cassettes/authenticate.yml
490
- - spec/fixtures/cassettes/delete.yml
491
- - spec/fixtures/cassettes/push.yml
492
- - spec/fixtures/cassettes/sync.yml
493
- - spec/fixtures/default/README
494
- - spec/fixtures/default/app/content_types/bands.yml
495
- - spec/fixtures/default/app/content_types/events.yml
496
- - spec/fixtures/default/app/content_types/messages.yml
497
- - spec/fixtures/default/app/content_types/songs.yml
498
- - spec/fixtures/default/app/content_types/updates.yml
499
- - spec/fixtures/default/app/views/pages/404.liquid.haml
500
- - spec/fixtures/default/app/views/pages/about_us.fr.liquid.haml
501
- - spec/fixtures/default/app/views/pages/about_us.liquid.haml
502
- - spec/fixtures/default/app/views/pages/about_us.nb.liquid.haml
503
- - spec/fixtures/default/app/views/pages/about_us/jane_doe.liquid.haml
504
- - spec/fixtures/default/app/views/pages/about_us/john_doe.fr.liquid.haml
505
- - spec/fixtures/default/app/views/pages/about_us/john_doe.liquid.haml
506
- - spec/fixtures/default/app/views/pages/all.liquid.haml
507
- - spec/fixtures/default/app/views/pages/archives/news.liquid.haml
508
- - spec/fixtures/default/app/views/pages/contact.liquid.haml
509
- - spec/fixtures/default/app/views/pages/contest.liquid.haml
510
- - spec/fixtures/default/app/views/pages/events.liquid.haml
511
- - spec/fixtures/default/app/views/pages/filtered.liquid.haml
512
- - spec/fixtures/default/app/views/pages/grunge_bands.liquid.haml
513
- - spec/fixtures/default/app/views/pages/index.fr.liquid.haml
514
- - spec/fixtures/default/app/views/pages/index.liquid.haml
515
- - spec/fixtures/default/app/views/pages/layouts/simple.liquid.haml
516
- - spec/fixtures/default/app/views/pages/music.fr.liquid.haml
517
- - spec/fixtures/default/app/views/pages/music.liquid.haml
518
- - spec/fixtures/default/app/views/pages/songs/template.fr.liquid.haml
519
- - spec/fixtures/default/app/views/pages/songs/template.liquid.haml
520
- - spec/fixtures/default/app/views/pages/songs/template/band.liquid.haml
521
- - spec/fixtures/default/app/views/pages/store.fr.liquid.haml
522
- - spec/fixtures/default/app/views/pages/store.liquid
523
- - spec/fixtures/default/app/views/pages/tags/nav.liquid.haml
524
- - spec/fixtures/default/app/views/pages/tags/nav_in_deep.liquid.haml
525
- - spec/fixtures/default/app/views/pages/unlisted_pages.liquid.haml
526
- - spec/fixtures/default/app/views/snippets/A_Complicated-one.liquid.haml
527
- - spec/fixtures/default/app/views/snippets/footer.liquid.haml
528
- - spec/fixtures/default/app/views/snippets/header.liquid.haml
529
- - spec/fixtures/default/app/views/snippets/song.fr.liquid.haml
530
- - spec/fixtures/default/app/views/snippets/song.liquid
531
- - spec/fixtures/default/config/autoprefixer.yml
532
- - spec/fixtures/default/config/deploy.yml
533
- - spec/fixtures/default/config/deploy_example.yml
534
- - spec/fixtures/default/config/site.yml
535
- - spec/fixtures/default/config/translations.yml
536
- - spec/fixtures/default/data/bands.yml
537
- - spec/fixtures/default/data/events.yml
538
- - spec/fixtures/default/data/songs.yml
539
- - spec/fixtures/default/data/updates.yml
540
- - spec/fixtures/default/icon.png
541
- - spec/fixtures/default/public/fonts/chunkfive-webfont.eot
542
- - spec/fixtures/default/public/fonts/chunkfive-webfont.svg
543
- - spec/fixtures/default/public/fonts/chunkfive-webfont.ttf
544
- - spec/fixtures/default/public/fonts/chunkfive-webfont.woff
545
- - spec/fixtures/default/public/fonts/chunkfive.css
546
- - spec/fixtures/default/public/fonts/chunkfive.otf
547
- - spec/fixtures/default/public/images/nav_on.png
548
- - spec/fixtures/default/public/images/photo_frame.png
549
- - spec/fixtures/default/public/images/sep.png
550
- - spec/fixtures/default/public/images/top.jpg
551
- - spec/fixtures/default/public/javascripts/application.js.coffee
552
- - spec/fixtures/default/public/javascripts/common.js
553
- - spec/fixtures/default/public/samples/asset_collections/cover.jpg
554
- - spec/fixtures/default/public/samples/photo.jpg
555
- - spec/fixtures/default/public/samples/photo_2.jpg
556
- - spec/fixtures/default/public/stylesheets/application.css
557
- - spec/fixtures/default/public/stylesheets/other/extra.css.less
558
- - spec/fixtures/default/public/stylesheets/other/style.css.scss
559
- - spec/fixtures/default/public/stylesheets/reboot.css
560
- - spec/integration/cli_spec.rb
561
- - spec/integration/commands/authenticate_command_spec.rb
562
- - spec/integration/commands/delete_command_spec.rb
563
- - spec/integration/commands/push_command_spec.rb
564
- - spec/integration/commands/sync_command_spec.rb
565
- - spec/integration/generators/page_spec.rb
566
- - spec/integration/generators/relationship_spec.rb
567
- - spec/integration/integration_helper.rb
568
- - spec/spec_helper.rb
569
- - spec/support/api_settings.rb
570
- - spec/support/chronic.rb
571
- - spec/support/helpers.rb
572
- - spec/support/matchers.rb
573
- - spec/support/pry.rb
574
- - spec/support/thor.rb
575
- - spec/support/vcr.rb
576
- - spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb
577
- - spec/unit/commands/pull_sub_commands/pull_content_types_command_spec.rb
578
- - spec/unit/commands/push_sub_commands/push_pages_command_spec.rb
579
- - spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb
580
- - spec/unit/decorators/content_entry_decorator_spec.rb
581
- - spec/unit/decorators/page_decorator_spec.rb
582
- - spec/unit/decorators/site_decorator_spec.rb
583
- - spec/unit/decorators/theme_asset_decorator_spec.rb
584
- - spec/unit/tools/glob_spec.rb
585
- - spec/unit/tools/yaml_ext_spec.rb
364
+ summary: Wagon is a site generator for the LocomotiveCMS engine powered by all the
365
+ efficient and modern HTML development tools (SASS, Webpack, ...etc).
366
+ test_files: []