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
data/Gemfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# Specify your gem's dependencies in railsthemes.gemspec
|
4
3
|
gemspec
|
5
4
|
gem 'thor'
|
6
5
|
gem 'rest-client'
|
7
6
|
gem 'launchy'
|
7
|
+
gem 'json'
|
8
|
+
# make sure you add any new dependencies in railsthemes.gemspec
|
8
9
|
|
9
10
|
group :development do
|
10
11
|
gem 'gem-release'
|
@@ -12,7 +13,6 @@ group :development do
|
|
12
13
|
gem 'guard-rspec'
|
13
14
|
end
|
14
15
|
|
15
|
-
# development gems
|
16
16
|
group :test do
|
17
17
|
gem 'rspec'
|
18
18
|
gem 'rr'
|
data/bin/railsthemes
CHANGED
@@ -4,9 +4,27 @@ require "thor"
|
|
4
4
|
require "railsthemes"
|
5
5
|
|
6
6
|
class Installer < Thor
|
7
|
-
desc "
|
7
|
+
desc "default", "The default task to run when no command is given"
|
8
|
+
method_option :version,
|
9
|
+
:desc => "See what version you have installed",
|
10
|
+
:aliases => ['-v', '--version'],
|
11
|
+
:type => :boolean
|
12
|
+
def default
|
13
|
+
if options[:version]
|
14
|
+
puts Railsthemes::VERSION
|
15
|
+
else
|
16
|
+
puts <<-EOS
|
17
|
+
railsthemes -v # Print the version of the installer gem you are using
|
18
|
+
railsthemes install your@email:code # Install from RailsThemes.com using your download code
|
19
|
+
railsthemes help [TASK] # Describe available tasks or one specific task
|
20
|
+
EOS
|
21
|
+
end
|
22
|
+
end
|
23
|
+
default_task :default
|
24
|
+
|
25
|
+
desc "install your@email:code", "Install from RailsThemes.com using your download code"
|
8
26
|
method_option :file,
|
9
|
-
:desc => "Use local
|
27
|
+
:desc => "Use local relative pathname instead of a code, and install from there.",
|
10
28
|
:type => :boolean
|
11
29
|
method_option :no_doc_popup,
|
12
30
|
:desc => "Do not pop up documentation on successful install.",
|
@@ -18,31 +36,28 @@ class Installer < Thor
|
|
18
36
|
method_option :debugging,
|
19
37
|
:desc => "Print gratuitous output on installation (for debugging).",
|
20
38
|
:type => :boolean
|
21
|
-
|
22
39
|
def install code_or_file
|
23
40
|
# might be better to pass in the options directly if we get more options
|
24
41
|
installer = Railsthemes::Installer.new
|
42
|
+
|
43
|
+
if options[:email]
|
44
|
+
end
|
45
|
+
|
25
46
|
installer.doc_popup = !options[:no_doc_popup]
|
26
|
-
|
27
|
-
|
47
|
+
Railsthemes::Logging.verbose if options[:verbose]
|
48
|
+
Railsthemes::Logging.debug if options[:debugging]
|
28
49
|
|
29
50
|
if options[:file]
|
30
51
|
file = code_or_file
|
31
52
|
abort 'Please specify a file to install from' unless file
|
32
|
-
puts "Installing from file: #{file}."
|
33
53
|
installer.install_from_file_system file
|
34
54
|
else
|
35
55
|
code = code_or_file
|
36
56
|
abort 'Please specify a code to install from' unless code
|
37
|
-
installer.
|
57
|
+
installer.install_from_code code
|
38
58
|
end
|
39
59
|
end
|
40
60
|
|
41
|
-
desc "version", "See what version you have installed"
|
42
|
-
def version
|
43
|
-
puts Railsthemes::VERSION
|
44
|
-
end
|
45
|
-
|
46
61
|
# AP: other options could include list, remove, help, etc.
|
47
62
|
end
|
48
63
|
|