thematic 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b0fae52234af12a215d1c690bdcfc8e9ce03e3f
4
- data.tar.gz: 970038ef1818a568e58c0cad39ac5204ad94fc1f
3
+ metadata.gz: 29b8eb8b1d905e4527b06169af17677fd8498dae
4
+ data.tar.gz: 6baeafe7b034cb407a9665115aef3ec40d460259
5
5
  SHA512:
6
- metadata.gz: 98037491e64176a202c69315fcda74c15ddf91707fe043b91a2c5102d9fd7f4925a848f0a2aca81c8364c4e273427effd875acefe8caed1be8ce3204f4caf4e1
7
- data.tar.gz: 7ff03c856277031be8dde0387c87482987fe6a656bb3ac6ee3bdcde894461086a9b3b76be6914b14180671387f8fbecce93fad353cb33319fe2ea9c857995ef9
6
+ metadata.gz: e832771b9513cab3930193e97980a6665c6c596dfaa722d8458525d878a7327da70a110120deddfd88da4a42669f8f0e13ffca4c9275064b92ee6936c7ce5747
7
+ data.tar.gz: 636ab87545ef540769fb62cc04e8aa7cd8a2839e0530c422b105bc106e675ce8ee4a4c49d8c71402326134777696f7274bffdc0f9eb50ca57691fca5b3b3079d
data/README.md CHANGED
@@ -1,26 +1,23 @@
1
1
  # Thematic
2
2
 
3
- TODO: Write a gem description
3
+ By running simple commands from the terminal, you can automatically convert regular [WrapBootstrap](http://wrapbootstrap.com) and other HTML/CSS/JS themes and have them integrate into your Rails app so that it plays nicely with the asset pipeline.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- ```ruby
10
- gem 'thematic'
11
- ```
12
9
 
13
- And then execute:
10
+ gem 'thematic'
14
11
 
15
- $ bundle
16
12
 
17
- Or install it yourself as:
13
+ ## Usage
18
14
 
19
- $ gem install thematic
15
+ Navigate to the root folder of your application, and run the following command:
20
16
 
21
- ## Usage
17
+ rake thematic:install[../relative/path/to/the/root/folder/of/your/theme]
18
+
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.
22
20
 
23
- TODO: Write usage instructions here
24
21
 
25
22
  ## Contributing
26
23
 
@@ -1,5 +1,27 @@
1
- namespace :sample do
2
- desc "descriptions of the task" task :name do
3
- puts "Hello!"
1
+ require 'fileutils'
2
+
3
+ namespace :thematic do
4
+ desc "descriptions of the task"
5
+ task :install, [:filepath] do |task, args|
6
+ puts "Inspecting theme..."
7
+
8
+ puts "Installing CSS..."
9
+ copy_from_path = "#{args[:filepath]}/css"
10
+
11
+ FileUtils.mkdir 'vendor/assets/stylesheets/theme'
12
+
13
+ Dir.open(copy_from_path).each do |filename|
14
+ copy("#{copy_from_path}/#{filename}", "vendor/assets/stylesheets/theme/") unless File.directory?("#{copy_from_path}/#{filename}")
15
+ end
16
+
17
+ puts "Installing JS..."
18
+ copy_from_path = "#{args[:filepath]}/js"
19
+
20
+ FileUtils.mkdir 'vendor/assets/javascripts/theme'
21
+
22
+ Dir.open(copy_from_path).each do |filename|
23
+ copy("#{copy_from_path}/#{filename}", "vendor/assets/javascripts/theme/") unless File.directory?("#{copy_from_path}/#{filename}")
24
+ end
25
+
4
26
  end
5
27
  end
@@ -1,3 +1,3 @@
1
1
  module Thematic
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thematic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Wengrow