wiskey 0.0.6 → 0.0.7
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/README.rdoc +42 -0
- data/Rakefile +2 -29
- data/bin/wiskey +5 -0
- data/lib/wiskey.rb +2 -0
- data/lib/wiskey/generator.rb +86 -0
- data/lib/wiskey/version.rb +1 -1
- data/wiskey.gemspec +4 -2
- metadata +19 -5
data/README.rdoc
CHANGED
@@ -28,6 +28,48 @@ require_tree, and require_self. DO NOT USE THEM IN YOUR SASS/SCSS FILES. They ar
|
|
28
28
|
primitive and do not work well with Sass files. Instead, use Sass's native @import directive
|
29
29
|
which sass-rails has customized to integrate with the conventions of your rails projects.
|
30
30
|
|
31
|
+
|
32
|
+
= Rails 2.3 or a non-Rails project (static site, jekyll, wordpress, etc...)
|
33
|
+
Wiskey includes an easy way to generate a directory with all the necessary files.
|
34
|
+
Install the wiskey gem:
|
35
|
+
|
36
|
+
gem install wiskey
|
37
|
+
|
38
|
+
Change the directory to where you want to generate the wiskey folder and files:
|
39
|
+
|
40
|
+
cd project_name/stylesheets/sass/
|
41
|
+
|
42
|
+
Install wiskey:
|
43
|
+
|
44
|
+
bundle exec wiskey install
|
45
|
+
|
46
|
+
This will generate a folder called `wiskey` containing all the mixins and other necessary wiskey files. It is recommended not to add or modify the files so that you can update it easily.
|
47
|
+
|
48
|
+
Update an existing installation with:
|
49
|
+
|
50
|
+
bundle exec wiskey update
|
51
|
+
|
52
|
+
This will delete the 'wiskey' directory and regenerate it.
|
53
|
+
|
54
|
+
*Sass Watch:* To output properly, Wiskey must be explicitly required (`-r`) by Sass at the command line:
|
55
|
+
|
56
|
+
# Example (project root directory)
|
57
|
+
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/wiskey/lib/wiskey.rb
|
58
|
+
|
59
|
+
For the Jekyll just add requirement into 'sass_converter.rb'
|
60
|
+
|
61
|
+
require 'wiskey'
|
62
|
+
|
63
|
+
|
64
|
+
You will need to import the mixins at the beginning of your stylesheet(s):
|
65
|
+
|
66
|
+
@import 'wiskey/wiskey';
|
67
|
+
|
68
|
+
= Thanks
|
69
|
+
|
70
|
+
For Thoughtbots and theys bourbon gem.
|
71
|
+
|
72
|
+
|
31
73
|
= License
|
32
74
|
|
33
75
|
This project rocks and uses MIT-LICENSE.
|
data/Rakefile
CHANGED
@@ -1,29 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'bundler/setup'
|
5
|
-
rescue LoadError
|
6
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
-
end
|
8
|
-
|
9
|
-
require 'rake'
|
10
|
-
require 'rake/rdoctask'
|
11
|
-
|
12
|
-
require 'rake/testtask'
|
13
|
-
|
14
|
-
Rake::TestTask.new(:test) do |t|
|
15
|
-
t.libs << 'lib'
|
16
|
-
t.libs << 'test'
|
17
|
-
t.pattern = 'test/**/*_test.rb'
|
18
|
-
t.verbose = false
|
19
|
-
end
|
20
|
-
|
21
|
-
task :default => :test
|
22
|
-
|
23
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
24
|
-
rdoc.rdoc_dir = 'rdoc'
|
25
|
-
rdoc.title = 'Wiskey'
|
26
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
27
|
-
rdoc.rdoc_files.include('README.rdoc')
|
28
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
29
|
-
end
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
data/bin/wiskey
ADDED
data/lib/wiskey.rb
CHANGED
@@ -0,0 +1,86 @@
|
|
1
|
+
require "fileutils"
|
2
|
+
|
3
|
+
module Wiskey
|
4
|
+
class Generator
|
5
|
+
def initialize(arguments)
|
6
|
+
@subcommand = arguments.first
|
7
|
+
end
|
8
|
+
|
9
|
+
def run
|
10
|
+
if @subcommand == "install"
|
11
|
+
install
|
12
|
+
elsif @subcommand == "update"
|
13
|
+
update
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def update
|
18
|
+
if wiskey_files_already_exist?
|
19
|
+
remove_wiskey_directory
|
20
|
+
install_files
|
21
|
+
puts "Wiskey files updated."
|
22
|
+
else
|
23
|
+
puts "No existing wiskey installation. Doing nothing."
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def install
|
28
|
+
if wiskey_files_already_exist?
|
29
|
+
puts "Wiskey files already installed, doing nothing."
|
30
|
+
else
|
31
|
+
install_files
|
32
|
+
puts "Wiskey files installed to wiskey/"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def wiskey_files_already_exist?
|
39
|
+
File.directory?("wiskey")
|
40
|
+
end
|
41
|
+
|
42
|
+
def install_files
|
43
|
+
make_lib_directory
|
44
|
+
copy_in_sass_extensions
|
45
|
+
copy_in_scss_files
|
46
|
+
end
|
47
|
+
|
48
|
+
def remove_wiskey_directory
|
49
|
+
FileUtils.rm_rf("wiskey")
|
50
|
+
end
|
51
|
+
|
52
|
+
def make_lib_directory
|
53
|
+
FileUtils.mkdir_p("wiskey/lib/wiskey")
|
54
|
+
end
|
55
|
+
|
56
|
+
def copy_in_sass_extensions
|
57
|
+
FileUtils.cp(File.join(lib_directory, "wiskey.rb"), "wiskey/lib/")
|
58
|
+
FileUtils.cp(File.join(lib_wiskey_directory, "sass_extensions.rb"), "wiskey/lib/wiskey/")
|
59
|
+
FileUtils.cp_r(File.join(lib_wiskey_directory, "sass_extensions"), "wiskey/lib/wiskey/")
|
60
|
+
end
|
61
|
+
|
62
|
+
def copy_in_scss_files
|
63
|
+
FileUtils.cp_r(all_stylesheets, "wiskey/")
|
64
|
+
end
|
65
|
+
|
66
|
+
def all_stylesheets
|
67
|
+
Dir["#{stylesheets_directory}/*"]
|
68
|
+
end
|
69
|
+
|
70
|
+
def stylesheets_directory
|
71
|
+
File.join(top_level_directory, "app", "assets", "stylesheets")
|
72
|
+
end
|
73
|
+
|
74
|
+
def lib_directory
|
75
|
+
File.join(top_level_directory, "lib")
|
76
|
+
end
|
77
|
+
|
78
|
+
def lib_wiskey_directory
|
79
|
+
File.join(top_level_directory, "lib", "wiskey")
|
80
|
+
end
|
81
|
+
|
82
|
+
def top_level_directory
|
83
|
+
File.dirname(File.dirname(File.dirname(__FILE__)))
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/lib/wiskey/version.rb
CHANGED
data/wiskey.gemspec
CHANGED
@@ -12,9 +12,11 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = "The rails 3 gem, which include SCSS mixins and default rails templates for true-cutupping."
|
13
13
|
s.version = Wiskey::VERSION
|
14
14
|
|
15
|
-
s.files
|
16
|
-
s.test_files
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
18
|
s.require_paths = ["lib"]
|
18
19
|
|
19
20
|
s.add_dependency 'sass', '>= 3.1'
|
21
|
+
s.add_development_dependency 'rake'
|
20
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wiskey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|
16
|
-
requirement: &
|
16
|
+
requirement: &70281346614100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,12 +21,24 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70281346614100
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70281346613680 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70281346613680
|
25
36
|
description: The rails 3 gem, which include SCSS mixins and default rails templates
|
26
37
|
for true-cutupping.
|
27
38
|
email:
|
28
39
|
- alexey@osipenko.in.ua
|
29
|
-
executables:
|
40
|
+
executables:
|
41
|
+
- wiskey
|
30
42
|
extensions: []
|
31
43
|
extra_rdoc_files: []
|
32
44
|
files:
|
@@ -55,9 +67,11 @@ files:
|
|
55
67
|
- app/assets/stylesheets/css3/_transition.scss
|
56
68
|
- app/assets/stylesheets/css3/_user-select.scss
|
57
69
|
- app/assets/stylesheets/functions/_experimental.scss
|
70
|
+
- bin/wiskey
|
58
71
|
- lib/tasks/install.rake
|
59
72
|
- lib/wiskey.rb
|
60
73
|
- lib/wiskey/engine.rb
|
74
|
+
- lib/wiskey/generator.rb
|
61
75
|
- lib/wiskey/sass_extensions.rb
|
62
76
|
- lib/wiskey/sass_extensions/functions.rb
|
63
77
|
- lib/wiskey/sass_extensions/functions/compact.rb
|