railsthemes 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/railsthemes/theme_installer.rb +17 -8
- data/lib/railsthemes/version.rb +1 -1
- data/spec/lib/railsthemes/theme_installer_spec.rb +12 -4
- metadata +15 -5
- checksums.yaml +0 -15
@@ -37,6 +37,7 @@ module Railsthemes
|
|
37
37
|
['mailers', 'app'],
|
38
38
|
['views', 'app'],
|
39
39
|
['fonts', 'app/assets'],
|
40
|
+
['vendor', ''],
|
40
41
|
]
|
41
42
|
|
42
43
|
logger.warn 'Done installing.'
|
@@ -62,17 +63,21 @@ module Railsthemes
|
|
62
63
|
output = <<-EOS
|
63
64
|
|
64
65
|
### Begin RailsThemes basic generated routes ###
|
66
|
+
|
65
67
|
# Routes to RailsThemes Theme Example markup:
|
66
|
-
|
67
|
-
|
68
|
-
match '
|
68
|
+
namespace :railsthemes do
|
69
|
+
match '/' => 'railsthemes#index'
|
70
|
+
match '/previews', controller: :previews, action: :index
|
71
|
+
match '/previews/:name', controller: :previews, action: :show
|
72
|
+
match '/previews/:feature/:partial', controller: :previews, action: :partial
|
73
|
+
match '/:action', controller: :railsthemes
|
69
74
|
end
|
70
75
|
|
71
76
|
# This is magical routing for errors (instead of using the static markup in
|
72
77
|
# public/*.html)
|
73
|
-
|
74
|
-
|
75
|
-
|
78
|
+
match '/403', to: 'railsthemes_errors#403_forbidden'
|
79
|
+
match '/404', to: 'railsthemes_errors#404_not_found'
|
80
|
+
match '/500', to: 'railsthemes_errors#500_internal_server_error'
|
76
81
|
|
77
82
|
### End RailsThemes basic generated routes ###
|
78
83
|
EOS
|
@@ -88,7 +93,7 @@ module Railsthemes
|
|
88
93
|
end
|
89
94
|
|
90
95
|
if lines.grep(/^\s*root /).count == 0
|
91
|
-
lines_to_insert << ' root :to => "railsthemes#index"'
|
96
|
+
lines_to_insert << ' root :to => "railsthemes/railsthemes#index"'
|
92
97
|
end
|
93
98
|
|
94
99
|
logger.warn 'Creating basic RailsThemes routes...'
|
@@ -100,7 +105,11 @@ module Railsthemes
|
|
100
105
|
# so if the gemspecs are in the Gemfile.lock, then the gem is in the Gemfile
|
101
106
|
def add_needed_gems
|
102
107
|
installed_gems = Utils.gemspecs.map(&:name)
|
103
|
-
['sass',
|
108
|
+
['sass',
|
109
|
+
'jquery-rails',
|
110
|
+
'jquery-ui-rails',
|
111
|
+
'coderay',
|
112
|
+
].each do |gemname|
|
104
113
|
Utils.add_gem_to_gemfile gemname unless installed_gems.include?(gemname)
|
105
114
|
end
|
106
115
|
|
data/lib/railsthemes/version.rb
CHANGED
@@ -80,6 +80,12 @@ describe Railsthemes::ThemeInstaller do
|
|
80
80
|
@installer.install_from_file_system('theme')
|
81
81
|
filesystem_should_match ['app/assets/fonts/railsthemes_themename/myfont.ttf']
|
82
82
|
end
|
83
|
+
|
84
|
+
it 'should copy fonts' do
|
85
|
+
create_file 'theme/vendor/assets/stylesheets/coderay.css'
|
86
|
+
@installer.install_from_file_system('theme')
|
87
|
+
filesystem_should_match ['vendor/assets/stylesheets/coderay.css']
|
88
|
+
end
|
83
89
|
end
|
84
90
|
|
85
91
|
it 'should handle directories that have spaces' do
|
@@ -215,6 +221,7 @@ describe Railsthemes::ThemeInstaller do
|
|
215
221
|
lines.grep(/^gem 'sass'/).count.should == 1
|
216
222
|
lines.grep(/^gem 'jquery-rails'/).count.should == 1
|
217
223
|
lines.grep(/^gem 'jquery-ui-rails'/).count.should == 1
|
224
|
+
lines.grep(/^gem 'coderay'/).count.should == 1
|
218
225
|
end
|
219
226
|
end
|
220
227
|
|
@@ -226,6 +233,7 @@ describe Railsthemes::ThemeInstaller do
|
|
226
233
|
lines.grep(/^gem 'sass'/).count.should == 1
|
227
234
|
lines.grep(/^gem 'jquery-rails'/).count.should == 1
|
228
235
|
lines.grep(/^gem 'jquery-ui-rails'/).count.should == 1
|
236
|
+
lines.grep(/^gem 'coderay'/).count.should == 1
|
229
237
|
end
|
230
238
|
end
|
231
239
|
end
|
@@ -295,7 +303,7 @@ end
|
|
295
303
|
it 'should add routing if it has not been generated yet' do
|
296
304
|
@installer.create_railsthemes_demo_routes
|
297
305
|
File.read('config/routes.rb').split("\n").grep(
|
298
|
-
/
|
306
|
+
/match '\/' => 'railsthemes#index'/
|
299
307
|
).count.should == 1
|
300
308
|
end
|
301
309
|
|
@@ -303,7 +311,7 @@ end
|
|
303
311
|
@installer.create_railsthemes_demo_routes
|
304
312
|
@installer.create_railsthemes_demo_routes
|
305
313
|
File.read('config/routes.rb').split("\n").grep(
|
306
|
-
/
|
314
|
+
/match '\/' => 'railsthemes#index'/
|
307
315
|
).count.should == 1
|
308
316
|
end
|
309
317
|
|
@@ -311,7 +319,7 @@ end
|
|
311
319
|
it 'should add root route' do
|
312
320
|
@installer.create_railsthemes_demo_routes
|
313
321
|
File.read('config/routes.rb').split("\n").grep(
|
314
|
-
' root :to => "railsthemes#index"'
|
322
|
+
' root :to => "railsthemes/railsthemes#index"'
|
315
323
|
).count.should == 1
|
316
324
|
end
|
317
325
|
end
|
@@ -321,7 +329,7 @@ end
|
|
321
329
|
@installer.create_railsthemes_demo_routes
|
322
330
|
@installer.create_railsthemes_demo_routes
|
323
331
|
File.read('config/routes.rb').split("\n").grep(
|
324
|
-
' root :to => "railsthemes#index"'
|
332
|
+
' root :to => "railsthemes/railsthemes#index"'
|
325
333
|
).count.should == 1
|
326
334
|
end
|
327
335
|
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railsthemes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Railsthemes
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: thor
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rest-client
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: launchy
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: json
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -116,26 +125,27 @@ files:
|
|
116
125
|
- spec/spec_helper.rb
|
117
126
|
homepage: https://github.com/RailsThemes/railsthemes
|
118
127
|
licenses: []
|
119
|
-
metadata: {}
|
120
128
|
post_install_message:
|
121
129
|
rdoc_options: []
|
122
130
|
require_paths:
|
123
131
|
- lib
|
124
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
125
134
|
requirements:
|
126
135
|
- - ! '>='
|
127
136
|
- !ruby/object:Gem::Version
|
128
137
|
version: '0'
|
129
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
130
140
|
requirements:
|
131
141
|
- - ! '>='
|
132
142
|
- !ruby/object:Gem::Version
|
133
143
|
version: '0'
|
134
144
|
requirements: []
|
135
145
|
rubyforge_project:
|
136
|
-
rubygems_version:
|
146
|
+
rubygems_version: 1.8.25
|
137
147
|
signing_key:
|
138
|
-
specification_version:
|
148
|
+
specification_version: 3
|
139
149
|
summary: Installs gems from railsthemes.com
|
140
150
|
test_files:
|
141
151
|
- features/railsthemes.feature
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NjAwMjc5ZDVkZWVlMWZmOGI3OWNlYmYyMDNiZjNhZWJlNDA0MzliMw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzRmNDMxN2ZhYjBkNThmN2MwOGRjMjgzYzYzOTA0NTVjYjYzMzc3OA==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NWRhNTk4MWE0M2M4Y2IxNzhkZWQ2MzJlMjEyZGZmYzE2NTc2MWEwN2Q2Mjhi
|
10
|
-
ZDAxMGIzNzNmN2QwMjVjOWZlOWM2YjZiOTNmNDVkZTVkZWQ3YWVjYmIzZWMw
|
11
|
-
NjhhNDU0OGM2OTE5ZDI4NGZjZTE5MGFmYWI2MWZiMmE0MzE1YzY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NWE5NTU1MzIwN2ZiNjk0YTRiODQxNzI4YzI2YTYxODIzN2U0MDFhMWQ1YTE5
|
14
|
-
ODFlMTE0MjQ3MGRkNGUyNjgxMzJhOTVjOTkwODY1OWZhNzkyMWEyNTJkN2M0
|
15
|
-
MmVkNjZjZDU5N2JjOTA1N2U3MDdmZjU0YTZiYTk0ZTk5N2MwMjE=
|