railsthemes 1.1.pre → 1.1.pre.2
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/Gemfile +2 -2
- data/bin/railsthemes +27 -12
- data/cacert.pem +3331 -0
- data/lib/railsthemes/email_installer.rb +73 -0
- data/lib/railsthemes/ensurer.rb +152 -0
- data/lib/railsthemes/installer.rb +116 -345
- data/lib/railsthemes/logging.rb +35 -0
- data/lib/railsthemes/theme_installer.rb +126 -0
- data/lib/railsthemes/utils.rb +116 -24
- data/lib/railsthemes/version.rb +1 -1
- data/lib/railsthemes.rb +22 -1
- data/railsthemes.gemspec +2 -0
- data/spec/fixtures/blank-assets/{base/app/assets/images/bg/sprite.png → email/app/assets/stylesheets/email.css} +0 -0
- data/spec/fixtures/blank-assets/{base/app/assets/images/image1.png → erb-css/base/app/assets/images/bg/sprite.png} +0 -0
- data/spec/fixtures/blank-assets/{base/app/assets/javascripts/jquery.dataTables.js → erb-css/base/app/assets/images/image1.png} +0 -0
- data/spec/fixtures/blank-assets/{base/app/assets/javascripts/scripts.js.erb → erb-css/base/app/assets/javascripts/jquery.dataTables.js} +0 -0
- data/spec/fixtures/blank-assets/{base/app/views/layouts/_interior_sidebar.html.erb → erb-css/base/app/assets/javascripts/scripts.js.erb} +0 -0
- data/spec/fixtures/blank-assets/{base → erb-css/base}/app/assets/stylesheets/style.css.erb +0 -0
- data/spec/fixtures/blank-assets/{base/app/views/layouts/application.html.erb → erb-css/base/app/views/layouts/_interior_sidebar.html.erb} +0 -0
- data/spec/fixtures/blank-assets/{base/app/views/layouts/homepage.html.erb → erb-css/base/app/views/layouts/application.html.erb} +0 -0
- data/spec/fixtures/blank-assets/{gems/formtastic/app/assets/stylesheets/formtastic.css.scss → erb-css/base/app/views/layouts/homepage.html.erb} +0 -0
- data/spec/fixtures/blank-assets/{gems/simple_form/app/assets/stylesheets/simple_form.css.scss → erb-css/gems/formtastic/app/assets/stylesheets/formtastic.css.scss} +0 -0
- data/spec/fixtures/blank-assets/erb-css/gems/simple_form/app/assets/stylesheets/simple_form.css.scss +0 -0
- data/spec/fixtures/{blank-assets.tar.gz → blank-assets-archived/email.tar.gz} +0 -0
- data/spec/fixtures/blank-assets-archived/erb-css.tar.gz +0 -0
- data/spec/lib/railsthemes/email_installer_spec.rb +8 -0
- data/spec/lib/railsthemes/ensurer_spec.rb +215 -0
- data/spec/lib/railsthemes/installer_spec.rb +100 -456
- data/spec/lib/railsthemes/theme_installer_spec.rb +206 -0
- data/spec/lib/railsthemes/utils_spec.rb +62 -0
- data/spec/spec_helper.rb +49 -0
- metadata +71 -26
- data/lib/railsthemes/win_cacerts.rb +0 -26
@@ -0,0 +1,206 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'railsthemes'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
describe Railsthemes::ThemeInstaller do
|
6
|
+
before do
|
7
|
+
setup_logger
|
8
|
+
@installer = Railsthemes::ThemeInstaller.new
|
9
|
+
@tempdir = stub_tempdir
|
10
|
+
|
11
|
+
# would be interesting to see if we still need these
|
12
|
+
FileUtils.touch('Gemfile.lock')
|
13
|
+
end
|
14
|
+
|
15
|
+
describe :install_from_archive do
|
16
|
+
# does not work on Windows, NotImplementedError in tar module
|
17
|
+
it 'should extract and then install from that extracted directory' do
|
18
|
+
filename = 'spec/fixtures/blank-assets-archived/erb-css.tar.gz'
|
19
|
+
FakeFS::FileSystem.clone(filename)
|
20
|
+
mock(@installer).install_from_file_system @tempdir
|
21
|
+
@installer.install_from_archive filename
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe :install_from_file_system do
|
26
|
+
context 'when the filepath is a directory' do
|
27
|
+
it 'should copy the files from that directory into the Rails app' do
|
28
|
+
FileUtils.mkdir_p('filepath/base')
|
29
|
+
FileUtils.touch('filepath/base/a')
|
30
|
+
FileUtils.touch('filepath/base/b')
|
31
|
+
mock(@installer).post_copying_changes
|
32
|
+
|
33
|
+
@installer.install_from_file_system('filepath')
|
34
|
+
File.should exist('a')
|
35
|
+
File.should exist('b')
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should handle directories that have spaces' do
|
39
|
+
FileUtils.mkdir_p('file path/base')
|
40
|
+
FileUtils.touch('file path/base/a')
|
41
|
+
FileUtils.touch('file path/base/b')
|
42
|
+
mock(@installer).post_copying_changes
|
43
|
+
|
44
|
+
@installer.install_from_file_system('file path')
|
45
|
+
File.should exist('a')
|
46
|
+
File.should exist('b')
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should handle windows style paths' do
|
50
|
+
FileUtils.mkdir_p('fp1/fp2/base')
|
51
|
+
FileUtils.touch('fp1/fp2/base/a')
|
52
|
+
FileUtils.touch('fp1/fp2/base/b')
|
53
|
+
FileUtils.mkdir_p('fp1/fp2/gems')
|
54
|
+
mock(@installer).post_copying_changes
|
55
|
+
|
56
|
+
@installer.install_from_file_system('fp1\fp2')
|
57
|
+
File.should exist('a')
|
58
|
+
File.should exist('b')
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should not copy system files' do
|
62
|
+
FileUtils.mkdir_p('filepath/base')
|
63
|
+
FileUtils.touch('filepath/base/.DS_Store')
|
64
|
+
mock(@installer).post_copying_changes
|
65
|
+
|
66
|
+
@installer.install_from_file_system('filepath')
|
67
|
+
File.should_not exist('.DS_Store')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'override file behavior' do
|
72
|
+
before do
|
73
|
+
FileUtils.mkdir_p('filepath/gems')
|
74
|
+
FileUtils.mkdir_p('filepath/base/app/assets/stylesheets')
|
75
|
+
FileUtils.mkdir_p("app/assets/stylesheets")
|
76
|
+
@filename = 'app/assets/stylesheets/railsthemes_THEME_overrides.anything'
|
77
|
+
FileUtils.touch("filepath/base/#{@filename}")
|
78
|
+
mock(@installer).post_copying_changes
|
79
|
+
stub(@installer).popup_documentation
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'should not overwrite override files when they already exist' do
|
83
|
+
File.open(@filename, 'w') do |f|
|
84
|
+
f.write "existing override"
|
85
|
+
end
|
86
|
+
|
87
|
+
@installer.install_from_file_system('filepath')
|
88
|
+
File.should exist(@filename)
|
89
|
+
File.read(@filename).should =~ /existing override/
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'should create override files when they do not already exist' do
|
93
|
+
@installer.install_from_file_system('filepath')
|
94
|
+
File.should exist(@filename)
|
95
|
+
File.read(@filename).should == ''
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'when the filepath is an archive file' do
|
100
|
+
it 'should extract the archive file to a temp directory if the archive exists' do
|
101
|
+
archive = 'tarfile.tar.gz'
|
102
|
+
FileUtils.touch archive
|
103
|
+
mock(@installer).install_from_archive archive
|
104
|
+
@installer.install_from_file_system 'tarfile'
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
context 'otherwise' do
|
109
|
+
it 'should report an error reading the file' do
|
110
|
+
mock(Railsthemes::Safe).log_and_abort(/either/)
|
111
|
+
@installer.install_from_file_system("does not exist")
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe '#create_railsthemes_demo_pages' do
|
117
|
+
before do
|
118
|
+
FileUtils.mkdir('config')
|
119
|
+
File.open(File.join('config', 'routes.rb'), 'w') do |f|
|
120
|
+
f.write <<-EOS
|
121
|
+
RailsApp::Application.routes.draw do
|
122
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
123
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
124
|
+
# match ':controller(/:action(/:id(.:format)))'
|
125
|
+
end
|
126
|
+
EOS
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'should create a RailsThemes controller' do
|
131
|
+
@installer.create_railsthemes_demo_pages
|
132
|
+
controller = File.join('app', 'controllers', 'railsthemes_controller.rb')
|
133
|
+
lines = File.read(controller).split("\n")
|
134
|
+
lines.count.should == 11
|
135
|
+
lines.first.should match /class RailsthemesController < ApplicationController/
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'should insert lines into the routes file' do
|
139
|
+
@installer.create_railsthemes_demo_pages
|
140
|
+
routes_file = File.join('config', 'routes.rb')
|
141
|
+
lines = File.read(routes_file).split("\n")
|
142
|
+
lines.grep(/match 'railsthemes\/landing' => 'railsthemes#landing'/).count.should == 1
|
143
|
+
lines.grep(/match 'railsthemes\/inner' => 'railsthemes#inner'/).count.should == 1
|
144
|
+
lines.grep(/match 'railsthemes\/jquery_ui' => 'railsthemes#jquery_ui'/).count.should == 1
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'should not insert lines into the routes file when run more than once' do
|
148
|
+
@installer.create_railsthemes_demo_pages
|
149
|
+
@installer.create_railsthemes_demo_pages
|
150
|
+
routes_file = File.join('config', 'routes.rb')
|
151
|
+
lines = File.read(routes_file).split("\n")
|
152
|
+
lines.grep(/match 'railsthemes\/landing' => 'railsthemes#landing'/).count.should == 1
|
153
|
+
lines.grep(/match 'railsthemes\/inner' => 'railsthemes#inner'/).count.should == 1
|
154
|
+
lines.grep(/match 'railsthemes\/jquery_ui' => 'railsthemes#jquery_ui'/).count.should == 1
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
describe :install_gems_from do
|
159
|
+
it 'should install the gems that we specify that match' do
|
160
|
+
FakeFS::FileSystem.clone('spec/fixtures/blank-assets')
|
161
|
+
# we only know about formtastic and simple_form in the gems directory
|
162
|
+
@installer.install_gems_from("spec/fixtures/blank-assets/erb-css", ['formtastic', 'kaminari'])
|
163
|
+
File.should exist('app/assets/stylesheets/formtastic.css.scss')
|
164
|
+
File.should_not exist('app/assets/stylesheets/kaminari.css.scss')
|
165
|
+
File.should_not exist('app/assets/stylesheets/simple_form.css.scss')
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
describe 'end to end operation' do
|
170
|
+
def verify_end_to_end_operation
|
171
|
+
['app/assets/images/image1.png',
|
172
|
+
'app/assets/images/bg/sprite.png',
|
173
|
+
'app/assets/javascripts/jquery.dataTables.js',
|
174
|
+
'app/assets/javascripts/scripts.js.erb',
|
175
|
+
'app/assets/stylesheets/style.css.erb',
|
176
|
+
'app/views/layouts/_interior_sidebar.html.erb',
|
177
|
+
'app/views/layouts/application.html.erb',
|
178
|
+
'app/views/layouts/homepage.html.erb'].each do |filename|
|
179
|
+
File.should exist(filename), "#{filename} was not present"
|
180
|
+
end
|
181
|
+
File.open('app/assets/stylesheets/style.css.erb').each do |line|
|
182
|
+
line.should match /style.css.erb/
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
before do
|
187
|
+
stub(@installer).post_copying_changes
|
188
|
+
FakeFS::FileSystem.clone('spec/fixtures')
|
189
|
+
# should add some gems to the gemfile here and test gem installation
|
190
|
+
end
|
191
|
+
|
192
|
+
it 'should extract correctly from directory' do
|
193
|
+
filename = 'spec/fixtures/blank-assets/erb-css'
|
194
|
+
@installer.install_from_file_system filename
|
195
|
+
verify_end_to_end_operation
|
196
|
+
end
|
197
|
+
|
198
|
+
# does not work on Windows, NotImplementedError in tar module
|
199
|
+
it 'should extract correctly from archive' do
|
200
|
+
filename = 'spec/fixtures/blank-assets-archived/erb-css'
|
201
|
+
@installer.install_from_file_system filename
|
202
|
+
verify_end_to_end_operation
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'railsthemes'
|
3
|
+
|
4
|
+
describe Railsthemes::Utils do
|
5
|
+
before do
|
6
|
+
setup_logger
|
7
|
+
end
|
8
|
+
|
9
|
+
describe :archive? do
|
10
|
+
it 'should be false if the file does not exist' do
|
11
|
+
Railsthemes::Utils.archive?('test/a/b/c/d.tar.gz').should be_false
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should be true for tar.gz file' do
|
15
|
+
FileUtils.mkdir_p('test/a/b/c')
|
16
|
+
FileUtils.touch('test/a/b/c/d.tar.gz')
|
17
|
+
Railsthemes::Utils.archive?('test/a/b/c/d.tar.gz').should be_true
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should be false for other extensions' do
|
21
|
+
FileUtils.mkdir_p('test/a/b/c.tar')
|
22
|
+
FileUtils.touch('test/a/b/c.tar/d.zip')
|
23
|
+
Railsthemes::Utils.archive?('test/a/b/c.tar/d.zip').should be_false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#get_primary_configuration' do
|
28
|
+
it 'should give erb and css when there is no Gemfile' do
|
29
|
+
Railsthemes::Utils.get_primary_configuration('').should == ['erb', 'css']
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'should give haml,scss when haml and sass are in the Gemfile' do
|
33
|
+
gemfile = using_gems 'haml', 'sass'
|
34
|
+
Railsthemes::Utils.get_primary_configuration(gemfile).should == ['haml', 'scss']
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should give haml,css when sass is not in the Gemfile but haml is' do
|
38
|
+
gemfile = using_gems 'haml'
|
39
|
+
Railsthemes::Utils.get_primary_configuration(gemfile).should == ['haml', 'css']
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should give erb,scss when haml is not in the gemfile but sass is' do
|
43
|
+
gemfile = using_gems 'sass'
|
44
|
+
Railsthemes::Utils.get_primary_configuration(gemfile).should == ['erb', 'scss']
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should give erb,css when haml and sass are not in the gemfile' do
|
48
|
+
gemfile = using_gems
|
49
|
+
Railsthemes::Utils.get_primary_configuration(gemfile).should == ['erb', 'css']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'download' do
|
54
|
+
it 'should log and abort if file not found at url' do
|
55
|
+
FakeWeb.register_uri :get,
|
56
|
+
'http://example.com/something',
|
57
|
+
:body => 'some random stuff', :status => ['404', 'Not Found']
|
58
|
+
mock(Railsthemes::Safe).log_and_abort /trouble/
|
59
|
+
Railsthemes::Utils.download(:url => 'http://example.com/something', :save_to => 'whatever')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,10 +4,16 @@ require 'logger'
|
|
4
4
|
require 'fakefs/spec_helpers'
|
5
5
|
require 'fakeweb'
|
6
6
|
|
7
|
+
LOGFILE_NAME = 'railsthemes.log'
|
8
|
+
|
7
9
|
RSpec.configure do |config|
|
8
10
|
config.mock_with :rr
|
9
11
|
config.include FakeFS::SpecHelpers
|
10
12
|
|
13
|
+
config.before :suite do
|
14
|
+
File.delete(LOGFILE_NAME) if File.exists?(LOGFILE_NAME)
|
15
|
+
end
|
16
|
+
|
11
17
|
# RSpec automatically cleans stuff out of backtraces;
|
12
18
|
# sometimes this is annoying when trying to debug something e.g. a gem
|
13
19
|
#config.backtrace_clean_patterns = [
|
@@ -20,3 +26,46 @@ RSpec.configure do |config|
|
|
20
26
|
end
|
21
27
|
|
22
28
|
FakeWeb.allow_net_connect = false
|
29
|
+
|
30
|
+
def using_gems *gems
|
31
|
+
"GEM\nremote: https://rubygems.org/\nspecs:\n" +
|
32
|
+
gems.map{|gem| " #{gem}"}.join("\n") +
|
33
|
+
"\nGEM\n remote: https://rubygems.org/"
|
34
|
+
end
|
35
|
+
|
36
|
+
def using_gem_specs specs = {}
|
37
|
+
lines = []
|
38
|
+
specs.each { |name, version| lines << " #{name} (#{version})"}
|
39
|
+
"GEM\nremote: https://rubygems.org/\nspecs:\n" +
|
40
|
+
lines.join("\n") +
|
41
|
+
"\nGEM\n remote: https://rubygems.org/"
|
42
|
+
end
|
43
|
+
|
44
|
+
def stub_tempdir
|
45
|
+
tempdir = ''
|
46
|
+
if OS.windows?
|
47
|
+
tempdir = File.join('C:', 'Users', 'Admin', 'AppData', 'Local', 'Temp')
|
48
|
+
else
|
49
|
+
tempdir = 'tmp'
|
50
|
+
end
|
51
|
+
stub(Railsthemes::Utils).generate_tempdir_name { tempdir }
|
52
|
+
tempdir
|
53
|
+
end
|
54
|
+
|
55
|
+
def setup_logger
|
56
|
+
logger = Logger.new(LOGFILE_NAME)
|
57
|
+
logger.info "#{self.example.description}"
|
58
|
+
Railsthemes::Logging.logger = logger
|
59
|
+
logger
|
60
|
+
end
|
61
|
+
|
62
|
+
def with_installer_version version, &block
|
63
|
+
old_version = Railsthemes::VERSION
|
64
|
+
Railsthemes.send(:remove_const, 'VERSION')
|
65
|
+
Railsthemes.const_set('VERSION', version)
|
66
|
+
|
67
|
+
block.call
|
68
|
+
|
69
|
+
Railsthemes.send(:remove_const, 'VERSION')
|
70
|
+
Railsthemes.const_set('VERSION', old_version)
|
71
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railsthemes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1923831877
|
5
5
|
prerelease: 4
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
9
|
- pre
|
10
|
-
|
10
|
+
- 2
|
11
|
+
version: 1.1.pre.2
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Railsthemes
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2012-
|
19
|
+
date: 2012-07-05 00:00:00 Z
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: thor
|
@@ -45,6 +46,34 @@ dependencies:
|
|
45
46
|
version: "0"
|
46
47
|
type: :runtime
|
47
48
|
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: launchy
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: json
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
type: :runtime
|
76
|
+
version_requirements: *id004
|
48
77
|
description: railsthemes.com installer gem
|
49
78
|
email:
|
50
79
|
- anthony@railsthemes.com
|
@@ -64,27 +93,37 @@ files:
|
|
64
93
|
- README.md
|
65
94
|
- Rakefile
|
66
95
|
- bin/railsthemes
|
96
|
+
- cacert.pem
|
67
97
|
- lib/railsthemes.rb
|
98
|
+
- lib/railsthemes/email_installer.rb
|
99
|
+
- lib/railsthemes/ensurer.rb
|
68
100
|
- lib/railsthemes/installer.rb
|
101
|
+
- lib/railsthemes/logging.rb
|
69
102
|
- lib/railsthemes/os.rb
|
70
103
|
- lib/railsthemes/safe.rb
|
71
104
|
- lib/railsthemes/tar.rb
|
105
|
+
- lib/railsthemes/theme_installer.rb
|
72
106
|
- lib/railsthemes/utils.rb
|
73
107
|
- lib/railsthemes/version.rb
|
74
|
-
- lib/railsthemes/win_cacerts.rb
|
75
108
|
- railsthemes.gemspec
|
76
|
-
- spec/fixtures/blank-assets.tar.gz
|
77
|
-
- spec/fixtures/blank-assets/
|
78
|
-
- spec/fixtures/blank-assets/
|
79
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
80
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
81
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
82
|
-
- spec/fixtures/blank-assets/base/app/
|
83
|
-
- spec/fixtures/blank-assets/base/app/
|
84
|
-
- spec/fixtures/blank-assets/base/app/views/layouts/
|
85
|
-
- spec/fixtures/blank-assets/
|
86
|
-
- spec/fixtures/blank-assets/
|
109
|
+
- spec/fixtures/blank-assets-archived/email.tar.gz
|
110
|
+
- spec/fixtures/blank-assets-archived/erb-css.tar.gz
|
111
|
+
- spec/fixtures/blank-assets/email/app/assets/stylesheets/email.css
|
112
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/images/bg/sprite.png
|
113
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/images/image1.png
|
114
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/javascripts/jquery.dataTables.js
|
115
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/javascripts/scripts.js.erb
|
116
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/stylesheets/style.css.erb
|
117
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/_interior_sidebar.html.erb
|
118
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/application.html.erb
|
119
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/homepage.html.erb
|
120
|
+
- spec/fixtures/blank-assets/erb-css/gems/formtastic/app/assets/stylesheets/formtastic.css.scss
|
121
|
+
- spec/fixtures/blank-assets/erb-css/gems/simple_form/app/assets/stylesheets/simple_form.css.scss
|
122
|
+
- spec/lib/railsthemes/email_installer_spec.rb
|
123
|
+
- spec/lib/railsthemes/ensurer_spec.rb
|
87
124
|
- spec/lib/railsthemes/installer_spec.rb
|
125
|
+
- spec/lib/railsthemes/theme_installer_spec.rb
|
126
|
+
- spec/lib/railsthemes/utils_spec.rb
|
88
127
|
- spec/spec_helper.rb
|
89
128
|
homepage: https://github.com/RailsThemes/railsthemes
|
90
129
|
licenses: []
|
@@ -122,16 +161,22 @@ signing_key:
|
|
122
161
|
specification_version: 3
|
123
162
|
summary: Installs gems from railsthemes.com
|
124
163
|
test_files:
|
125
|
-
- spec/fixtures/blank-assets.tar.gz
|
126
|
-
- spec/fixtures/blank-assets/
|
127
|
-
- spec/fixtures/blank-assets/
|
128
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
129
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
130
|
-
- spec/fixtures/blank-assets/base/app/assets/
|
131
|
-
- spec/fixtures/blank-assets/base/app/
|
132
|
-
- spec/fixtures/blank-assets/base/app/
|
133
|
-
- spec/fixtures/blank-assets/base/app/views/layouts/
|
134
|
-
- spec/fixtures/blank-assets/
|
135
|
-
- spec/fixtures/blank-assets/
|
164
|
+
- spec/fixtures/blank-assets-archived/email.tar.gz
|
165
|
+
- spec/fixtures/blank-assets-archived/erb-css.tar.gz
|
166
|
+
- spec/fixtures/blank-assets/email/app/assets/stylesheets/email.css
|
167
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/images/bg/sprite.png
|
168
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/images/image1.png
|
169
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/javascripts/jquery.dataTables.js
|
170
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/javascripts/scripts.js.erb
|
171
|
+
- spec/fixtures/blank-assets/erb-css/base/app/assets/stylesheets/style.css.erb
|
172
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/_interior_sidebar.html.erb
|
173
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/application.html.erb
|
174
|
+
- spec/fixtures/blank-assets/erb-css/base/app/views/layouts/homepage.html.erb
|
175
|
+
- spec/fixtures/blank-assets/erb-css/gems/formtastic/app/assets/stylesheets/formtastic.css.scss
|
176
|
+
- spec/fixtures/blank-assets/erb-css/gems/simple_form/app/assets/stylesheets/simple_form.css.scss
|
177
|
+
- spec/lib/railsthemes/email_installer_spec.rb
|
178
|
+
- spec/lib/railsthemes/ensurer_spec.rb
|
136
179
|
- spec/lib/railsthemes/installer_spec.rb
|
180
|
+
- spec/lib/railsthemes/theme_installer_spec.rb
|
181
|
+
- spec/lib/railsthemes/utils_spec.rb
|
137
182
|
- spec/spec_helper.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# This is required on Windows to get around an issue where SSL certificates
|
2
|
-
# are not loaded properly on default
|
3
|
-
#
|
4
|
-
# originally from https://raw.github.com/gist/867550/win_fetch_cacerts.rb, from
|
5
|
-
# https://gist.github.com/867550
|
6
|
-
|
7
|
-
require 'net/http'
|
8
|
-
|
9
|
-
module Railsthemes
|
10
|
-
class WinCacerts
|
11
|
-
def self.fetch
|
12
|
-
# create a path to the file "C:\RailsInstaller\cacert.pem"
|
13
|
-
cacert_file = File.join(%w{c: RailsInstaller cacert.pem})
|
14
|
-
|
15
|
-
Net::HTTP.start("curl.haxx.se") do |http|
|
16
|
-
resp = http.get("/ca/cacert.pem")
|
17
|
-
if resp.code == "200"
|
18
|
-
open(cacert_file, "wb") { |file| file.write(resp.body) }
|
19
|
-
ENV['SSL_CERT_FILE'] = 'C:\RailsInstaller\cacert.pem'
|
20
|
-
else
|
21
|
-
Railsthemes::Safe.log_and_abort "A cacert.pem bundle could not be downloaded."
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|