thematic 0.1.2 → 0.1.3

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: 595b4c78d370b9a5fa31f4245648d0d34af4f031
4
- data.tar.gz: 92d105e2b217c90e4fb78267d4e8d724f18931ce
3
+ metadata.gz: 449212ed6179813cd5dbdcf4f385f8d494a68e81
4
+ data.tar.gz: 4f90ff7035688cf9d4386f4bc996ab9572f24b67
5
5
  SHA512:
6
- metadata.gz: 12875e4efc45866d767d72d4326fd64ef9398680f2e1bb73ebb11ab5518a283945b1dc63a662154989c98ed67c744d96f22635d338ab59663c6e8bb2e08c362e
7
- data.tar.gz: d520b6534558fcf1751135ec5e79bf566871c7287a19071f82be1021e243d132927b38ab4b7f4b5817522ec792930b477ce41b4bd172667f0524936e009ab74a
6
+ metadata.gz: c50cc05fdc65b389f75c15aa7da049dad5797a7f9e08d7e1c0c077baeda9d3d3d0a652f2b3460bb12fec8b09a417820b036b4abe9f1a01444ed0395f9491bacf
7
+ data.tar.gz: b1488a54b1bb1da2898abc25c62bc71f0684104e6578bf2f64510cc433b6f05d56d00661dc5574b0c1024fb4cc900d4a4b9d8842e0b4c130323e737ca9eed9f2
data/README.md CHANGED
@@ -12,11 +12,13 @@ Add this line to your application's Gemfile:
12
12
 
13
13
  ## Usage
14
14
 
15
+ You can watch a [video demo!](https://vimeo.com/126414898) of Thematic being used in action.
16
+
15
17
  Navigate to the root folder of your application, and run the following command:
16
18
 
17
19
  rake thematic:install[../relative/path/to/the/root/folder/of/your/theme]
18
20
 
19
- The root folder of your theme should be the one that contains the folders 'css' and 'js', as is standard in most WrapBoostrap themes.
21
+ The root folder of your theme should be the one that contains the folders 'css', 'img', and 'js', as is standard in many themes.
20
22
 
21
23
  You can also automatically grab an entire HTML template from the theme as well, and copy it into your app/views/layouts/application.html.erb. (WARNING: THIS WILL OVERWRITE ANY CUSTOM CODE YOU HAVE THERE. So this is something you would do early on in your project.) To do so, run this command:
22
24
 
@@ -26,7 +28,13 @@ The installation only copies JavaScript from the JS folder, but if there are add
26
28
 
27
29
  rake thematic:plugin[../relative/path/to/your/plugin/folder]
28
30
 
29
- You can also watch a [video demo!](https://vimeo.com/126414898)
31
+ By default, it is assumed that the images are found in a folder called 'img', and that the JavaScript is found in a folder called 'js', but if either of these are not the case, you can specify as such in IMAGES and JAVASCRIPT environment variables. For example, if the images folder was called 'images', and the JavaScript folder was called 'javascripts', you'd run the command as follows:
32
+
33
+ rake thematic:install[../relative/path/to/the/root/folder/of/your/theme] IMAGES=images JAVASCRIPT=javascripts
34
+
35
+ Thematic, by default, will create subfolders throughout your application called 'theme'. If you want to choose a different name for that subfolder, can do so with the THEME environment variable. For example:
36
+
37
+ rake thematic:install[../relative/path/to/the/root/folder/of/your/theme] THEME=cowabunga
30
38
 
31
39
  ## Contributing
32
40
 
@@ -10,13 +10,9 @@ namespace :thematic do
10
10
 
11
11
  # We will search the entire theme and all subfolders for all css files
12
12
  copy_from_path = args[:filepath]
13
- theme_subfolder = "theme"
14
-
15
- if File.exist?("#{args[:filepath]}/img")
16
- images_folder = "img"
17
- elsif File.exist?("#{args[:filepath]}/images")
18
- images_folder = "images"
19
- end
13
+ theme_subfolder = ENV["THEME"] || "theme"
14
+ images_folder = ENV["IMAGES"] || "img"
15
+ javascript_folder = ENV["JAVASCRIPT"] || "js"
20
16
 
21
17
  FileUtils.remove_dir "vendor/assets/stylesheets/#{theme_subfolder}" if File.exist?("vendor/assets/stylesheets/#{theme_subfolder}")
22
18
  FileUtils.mkdir "vendor/assets/stylesheets/#{theme_subfolder}"
@@ -50,7 +46,7 @@ namespace :thematic do
50
46
  puts "Installing JS..."
51
47
 
52
48
  # We will only search the js folder for js files; plugins can be added via the plugin task below
53
- copy_from_path = "#{args[:filepath]}/js"
49
+ copy_from_path = "#{args[:filepath]}/#{javascript_folder}"
54
50
 
55
51
  FileUtils.remove_dir "vendor/assets/javascripts/#{theme_subfolder}" if File.exist?("vendor/assets/javascripts/#{theme_subfolder}")
56
52
  FileUtils.mkdir "vendor/assets/javascripts/#{theme_subfolder}"
@@ -160,7 +156,8 @@ namespace :thematic do
160
156
 
161
157
  task :plugin, [:filepath] do |task, args|
162
158
  copy_from_path = args[:filepath]
163
- theme_subfolder = "theme"
159
+ theme_subfolder = ENV["THEME"] || "theme"
160
+
164
161
 
165
162
  file_to_edit = "app/assets/javascripts/application.js"
166
163
  f = File.new(file_to_edit)
@@ -188,7 +185,8 @@ namespace :thematic do
188
185
  end
189
186
 
190
187
  task :template, [:filepath] do |task, args|
191
- theme_subfolder = "theme"
188
+ theme_subfolder = ENV["THEME"] || "theme"
189
+ images_folder = ENV["IMAGES"] || "img"
192
190
 
193
191
  # user is expected to input which html template to copy from
194
192
  sourcefile = File.open(args[:filepath], 'r')
@@ -1,3 +1,3 @@
1
1
  module Thematic
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thematic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Wengrow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler