cyborg 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fab1d30be9ab99ceb8984d7546422d875464dc9
4
- data.tar.gz: 1231848ccee2b3475c70d50cc96fb1b34aba60ad
3
+ metadata.gz: 77e51259530bcf60b10cbf276842a5191cdf536d
4
+ data.tar.gz: d4982161be378dc8c619ffdb87f643955779a7f7
5
5
  SHA512:
6
- metadata.gz: 34211c67e257f97026f6f880c5e56e195f4b8e33915bf15e74b89e2cd0b207f5034dd68f355e39410b8f66c4dcea6a546fc5690827b29343da980d88d65440c7
7
- data.tar.gz: 576cb45453ee2659b15d2a6247e716521c1ec9bcf1af4a46fb5af9feb2409d9e8a8496e7cff6007e4e9325b626480153427519e0137147162622d658549bc836
6
+ metadata.gz: 71e9196b88a51ea10c9df4aa18fb1e2bb11d7b541eda25670098d47073367f38f8adc91c31c41309202baa96a72d3e6691be874007cc10ba7e6f3e20ad8b13f1
7
+ data.tar.gz: 73dd8ee992a169825af02e800ce985a9b4bc0567e0dbd62012f58db7186adfd2f70f2d33b12a4ee6b1c7253c3a97417566435fc1603c866350ebfbb7e15150bb
data/cyborg.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Brandon Mathis"]
9
9
  spec.email = ["brandon@imathis.com"]
10
10
 
11
- spec.summary = %q{Build style-guide plugins Rails (and humans).}
12
- spec.description = %q{Build style-guide plugins Rails (and humans).}
11
+ spec.summary = %q{Build a great style-guide for Rails (and humans).}
12
+ spec.description = %q{This is a tool for creating powerufl style guides using rails engines and awesomeness.}
13
13
  spec.homepage = "https://github.com/compose-ui/cyborg"
14
14
  spec.license = "MIT"
15
15
 
@@ -18,16 +18,16 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "sass"
22
- spec.add_runtime_dependency "esvg", "~> 2.9.1"
21
+ spec.add_runtime_dependency "sass", "~> 3.4"
22
+ spec.add_runtime_dependency "esvg", "~> 2.9"
23
23
  spec.add_runtime_dependency "listen", "~> 3.0"
24
- spec.add_runtime_dependency 'block_helpers', '~> 0.3.3'
25
- spec.add_runtime_dependency 'colorize'
24
+ spec.add_runtime_dependency 'block_helpers', '~> 0.3'
25
+ spec.add_runtime_dependency 'colorize', "~> 0.8"
26
26
  spec.add_runtime_dependency "bundler", "~> 1.11"
27
27
  spec.add_runtime_dependency "autoprefixer-rails", "~> 6.4"
28
28
 
29
- spec.add_runtime_dependency "rails", ">= 4.2.6"
30
- spec.add_dependency 'rack-cors'
29
+ spec.add_runtime_dependency "rails", ">= 4.2", "< 6"
30
+ spec.add_dependency 'rack-cors', "~> 0.4"
31
31
 
32
32
  spec.add_development_dependency "bundler", "~> 1.11"
33
33
  spec.add_development_dependency "rake", "~> 10.0"
@@ -32,6 +32,8 @@ module Cyborg
32
32
  from_root { gem_build }
33
33
  when 'gem:install'
34
34
  from_root { gem_install }
35
+ when 'gem:release'
36
+ from_root { gem_release }
35
37
  else
36
38
  puts "Command `#{options[:command]}` not recognized"
37
39
  end
@@ -46,18 +48,31 @@ module Cyborg
46
48
  end
47
49
 
48
50
  def gem_build
51
+ @production = true
52
+ FileUtils.rm_rf('public')
49
53
  dispatch(:build)
50
54
  system "bundle exec rake build"
51
55
  end
52
56
 
53
57
  def gem_install
58
+ @production = true
59
+ FileUtils.rm_rf('public')
54
60
  dispatch(:build)
55
61
  system "bundle exec rake install"
56
62
  end
57
63
 
58
64
  def gem_release
65
+ @production = true
66
+ FileUtils.rm_rf('public')
59
67
  dispatch(:build)
60
- system "bundle exec rake release"
68
+
69
+ if key = ENV['RUBYGEMS_API_KEY']
70
+ gem = "#{Cyborg.plugin.gem_name}-#{Cyborg.plugin.version}.gem"
71
+ system "bundle exec rake build"
72
+ system "curl --data-binary @#{gem} -H 'Authorization:#{key}' https://rubygems.org/api/v1/gems"
73
+ else
74
+ system 'bundle exec rake release'
75
+ end
61
76
  end
62
77
 
63
78
  def require_rails
@@ -65,8 +80,9 @@ module Cyborg
65
80
  end
66
81
 
67
82
  def clean
68
- require_rails
69
- Cyborg.plugin.clean
83
+ FileUtils.rm_rf(Cyborg.rails_path('tmp/cache/'))
84
+ FileUtils.rm_rf('.sass-cache')
85
+ FileUtils.rm_rf(Cyborg.rails_path('.sass-cache'))
70
86
  end
71
87
 
72
88
  # Handles running threaded commands
@@ -81,7 +97,8 @@ module Cyborg
81
97
  def build(options={})
82
98
  puts Cyborg.production? ? 'Building for production…' : 'Building…'
83
99
  require_rails
84
- @threads.concat Cyborg.plugin.build(options)
100
+ clean if Cyborg.production?
101
+ Cyborg.plugin.build(options)
85
102
  end
86
103
 
87
104
  # Watch assets for changes and build
@@ -208,8 +208,12 @@ end})
208
208
  end
209
209
  end})
210
210
 
211
- write_file(File.join(site_path, 'app/views/layouts/default.html.erb'), "<%= render_layout do %>\n<% end %>")
211
+ layout = %Q{<%= render_layout '#{namespace}/default' do %>
212
+ <% stylesheets do %><%= stylesheet_link_tag('application')<% end %>
213
+ <% javascripts do %><%= javascript_include_tag('application')<% end %>
214
+ <% end %>}
212
215
 
216
+ write_file(File.join(site_path, 'app/views/layouts/default.html.erb'), layout)
213
217
  write_file(File.join(site_path, 'app/views/docs/index.html.erb'), "<h1>#{plugin_module} Documentation</h1>")
214
218
  end
215
219
 
data/lib/cyborg/plugin.rb CHANGED
@@ -70,27 +70,17 @@ module Cyborg
70
70
  end
71
71
 
72
72
  def build(options={})
73
- # TODO: be sure gem builds use a clean asset_path
74
- #FileUtils.rm_rf(root) if Cyborg.production?
75
73
  FileUtils.mkdir_p(asset_path)
76
- threads = []
77
74
  assets(options).each do |asset|
78
- threads << Thread.new { asset.build }
75
+ asset.build
79
76
  end
80
77
 
81
- threads
82
78
  end
83
79
 
84
80
  def watch(options)
85
81
  assets(options).map(&:watch)
86
82
  end
87
83
 
88
- def clean
89
- FileUtils.rm_rf(Cyborg.rails_path('tmp/cache/'))
90
- FileUtils.rm_rf('.sass-cache')
91
- FileUtils.rm_rf(Cyborg.rails_path('.sass-cache'))
92
- end
93
-
94
84
  def config(options)
95
85
  options = {
96
86
  production_asset_root: "/assets/#{name}",
@@ -98,6 +88,7 @@ module Cyborg
98
88
  destination: "public/",
99
89
  root: @gem.full_gem_path,
100
90
  version: @gem.version.to_s,
91
+ gem_name: @gem.name,
101
92
  paths: {
102
93
  stylesheets: "app/assets/stylesheets/#{name}",
103
94
  javascripts: "app/assets/javascripts/#{name}",
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyborg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-04 00:00:00.000000000 Z
11
+ date: 2016-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '3.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '3.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: esvg
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.9.1
33
+ version: '2.9'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.9.1
40
+ version: '2.9'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: listen
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.3
61
+ version: '0.3'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.3
68
+ version: '0.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: colorize
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '0.8'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -114,28 +114,34 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 4.2.6
117
+ version: '4.2'
118
+ - - "<"
119
+ - !ruby/object:Gem::Version
120
+ version: '6'
118
121
  type: :runtime
119
122
  prerelease: false
120
123
  version_requirements: !ruby/object:Gem::Requirement
121
124
  requirements:
122
125
  - - ">="
123
126
  - !ruby/object:Gem::Version
124
- version: 4.2.6
127
+ version: '4.2'
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '6'
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: rack-cors
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - ">="
135
+ - - "~>"
130
136
  - !ruby/object:Gem::Version
131
- version: '0'
137
+ version: '0.4'
132
138
  type: :runtime
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
- - - ">="
142
+ - - "~>"
137
143
  - !ruby/object:Gem::Version
138
- version: '0'
144
+ version: '0.4'
139
145
  - !ruby/object:Gem::Dependency
140
146
  name: bundler
141
147
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +170,8 @@ dependencies:
164
170
  - - "~>"
165
171
  - !ruby/object:Gem::Version
166
172
  version: '10.0'
167
- description: Build style-guide plugins Rails (and humans).
173
+ description: This is a tool for creating powerufl style guides using rails engines
174
+ and awesomeness.
168
175
  email:
169
176
  - brandon@imathis.com
170
177
  executables:
@@ -218,5 +225,5 @@ rubyforge_project:
218
225
  rubygems_version: 2.5.1
219
226
  signing_key:
220
227
  specification_version: 4
221
- summary: Build style-guide plugins Rails (and humans).
228
+ summary: Build a great style-guide for Rails (and humans).
222
229
  test_files: []