tonic 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -2
- data/Gemfile.lock +116 -1
- data/README.md +0 -1
- data/lib/tonic/gh_pages.rb +5 -8
- data/lib/tonic/version.rb +1 -1
- data/spec/tonic/tonic_spec.rb +39 -34
- metadata +10 -10
data/.travis.yml
CHANGED
@@ -3,8 +3,8 @@ rvm:
|
|
3
3
|
- 1.8.7
|
4
4
|
- 1.9.2
|
5
5
|
- 1.9.3
|
6
|
-
- jruby-18mode # JRuby in 1.8 mode
|
7
|
-
- jruby-19mode # JRuby in 1.9 mode
|
6
|
+
# - jruby-18mode # JRuby in 1.8 mode
|
7
|
+
# - jruby-19mode # JRuby in 1.9 mode
|
8
8
|
- rbx-18mode
|
9
9
|
- rbx-19mode
|
10
10
|
# uncomment this line if your project needs to run something other than `rake`:
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,102 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tonic (0.0.
|
4
|
+
tonic (0.0.4)
|
5
|
+
jekyll
|
6
|
+
middleman
|
5
7
|
|
6
8
|
GEM
|
7
9
|
remote: http://rubygems.org/
|
8
10
|
specs:
|
11
|
+
activesupport (3.2.3)
|
12
|
+
i18n (~> 0.6)
|
13
|
+
multi_json (~> 1.0)
|
14
|
+
addressable (2.2.7)
|
15
|
+
albino (1.3.3)
|
16
|
+
posix-spawn (>= 0.3.6)
|
17
|
+
chunky_png (1.2.5)
|
18
|
+
classifier (1.3.3)
|
19
|
+
fast-stemmer (>= 1.0.0)
|
20
|
+
coffee-script (2.2.0)
|
21
|
+
coffee-script-source
|
22
|
+
execjs
|
23
|
+
coffee-script-source (1.2.0)
|
24
|
+
compass (0.12.1)
|
25
|
+
chunky_png (~> 1.2)
|
26
|
+
fssm (>= 0.2.7)
|
27
|
+
sass (~> 3.1)
|
28
|
+
daemons (1.1.8)
|
9
29
|
diff-lcs (1.1.3)
|
30
|
+
directory_watcher (1.4.1)
|
31
|
+
em-websocket (0.3.6)
|
32
|
+
addressable (>= 2.1.1)
|
33
|
+
eventmachine (>= 0.12.9)
|
34
|
+
eventmachine (0.12.10)
|
35
|
+
execjs (1.2.13)
|
36
|
+
multi_json (~> 1.0)
|
37
|
+
fast-stemmer (1.0.0)
|
38
|
+
fssm (0.2.8.1)
|
39
|
+
guard (0.6.3)
|
40
|
+
thor (~> 0.14.6)
|
41
|
+
guard-livereload (0.3.1)
|
42
|
+
em-websocket (>= 0.2.0)
|
43
|
+
guard (>= 0.4.0)
|
44
|
+
multi_json (~> 1.0.3)
|
45
|
+
haml (3.1.4)
|
46
|
+
hike (1.2.1)
|
47
|
+
http_router (0.10.2)
|
48
|
+
rack (>= 1.0.0)
|
49
|
+
url_mount (~> 0.2.1)
|
50
|
+
i18n (0.6.0)
|
51
|
+
jekyll (0.11.2)
|
52
|
+
albino (~> 1.3)
|
53
|
+
classifier (~> 1.3)
|
54
|
+
directory_watcher (~> 1.1)
|
55
|
+
kramdown (~> 0.13)
|
56
|
+
liquid (~> 2.3)
|
57
|
+
maruku (~> 0.5)
|
58
|
+
kramdown (0.13.5)
|
59
|
+
liquid (2.3.0)
|
60
|
+
maruku (0.6.0)
|
61
|
+
syntax (>= 1.0.0)
|
62
|
+
middleman (2.0.15.1)
|
63
|
+
coffee-script (~> 2.2.0)
|
64
|
+
compass (~> 0.11)
|
65
|
+
execjs (~> 1.2.7)
|
66
|
+
guard (~> 0.6.2)
|
67
|
+
haml (~> 3.1.0)
|
68
|
+
maruku (~> 0.6.0)
|
69
|
+
middleman-livereload (~> 0.2.0)
|
70
|
+
padrino-core (~> 0.10.5)
|
71
|
+
padrino-helpers (~> 0.10.5)
|
72
|
+
rack (~> 1.3.5)
|
73
|
+
rack-test (~> 0.6.1)
|
74
|
+
sass (>= 3.1.7)
|
75
|
+
sinatra (~> 1.3.1)
|
76
|
+
slim (~> 1.0.2)
|
77
|
+
sprockets (~> 2.0.3)
|
78
|
+
thin (~> 1.2.11)
|
79
|
+
thor (~> 0.14.0)
|
80
|
+
tilt (~> 1.3.1)
|
81
|
+
uglifier (~> 1.0.0)
|
82
|
+
middleman-livereload (0.2.1)
|
83
|
+
guard-livereload (~> 0.3.1)
|
84
|
+
multi_json (1.0.4)
|
85
|
+
padrino-core (0.10.6)
|
86
|
+
activesupport (~> 3.2.0)
|
87
|
+
http_router (~> 0.10.2)
|
88
|
+
sinatra (~> 1.3.1)
|
89
|
+
thor (~> 0.14.3)
|
90
|
+
tilt (~> 1.3.0)
|
91
|
+
padrino-helpers (0.10.6)
|
92
|
+
i18n (~> 0.6)
|
93
|
+
padrino-core (= 0.10.6)
|
94
|
+
posix-spawn (0.3.6)
|
95
|
+
rack (1.3.6)
|
96
|
+
rack-protection (1.2.0)
|
97
|
+
rack
|
98
|
+
rack-test (0.6.1)
|
99
|
+
rack (>= 1.0)
|
10
100
|
rake (0.9.2.2)
|
11
101
|
rspec (2.9.0)
|
12
102
|
rspec-core (~> 2.9.0)
|
@@ -16,6 +106,31 @@ GEM
|
|
16
106
|
rspec-expectations (2.9.0)
|
17
107
|
diff-lcs (~> 1.1.3)
|
18
108
|
rspec-mocks (2.9.0)
|
109
|
+
sass (3.1.15)
|
110
|
+
sinatra (1.3.2)
|
111
|
+
rack (~> 1.3, >= 1.3.6)
|
112
|
+
rack-protection (~> 1.2)
|
113
|
+
tilt (~> 1.3, >= 1.3.3)
|
114
|
+
slim (1.0.4)
|
115
|
+
temple (~> 0.3.4)
|
116
|
+
tilt (~> 1.3.2)
|
117
|
+
sprockets (2.0.3)
|
118
|
+
hike (~> 1.2)
|
119
|
+
rack (~> 1.0)
|
120
|
+
tilt (~> 1.1, != 1.3.0)
|
121
|
+
syntax (1.0.0)
|
122
|
+
temple (0.3.5)
|
123
|
+
thin (1.2.11)
|
124
|
+
daemons (>= 1.0.9)
|
125
|
+
eventmachine (>= 0.12.6)
|
126
|
+
rack (>= 1.0.0)
|
127
|
+
thor (0.14.6)
|
128
|
+
tilt (1.3.3)
|
129
|
+
uglifier (1.0.4)
|
130
|
+
execjs (>= 0.3.0)
|
131
|
+
multi_json (>= 1.0.2)
|
132
|
+
url_mount (0.2.1)
|
133
|
+
rack
|
19
134
|
|
20
135
|
PLATFORMS
|
21
136
|
ruby
|
data/README.md
CHANGED
@@ -58,7 +58,6 @@ $ gem install tonic
|
|
58
58
|
$ tonic [middleman|jekyll]
|
59
59
|
```
|
60
60
|
|
61
|
-
It will ask you - do you really want blahblahblah. You say `y` and there is it!
|
62
61
|
Will be created branch gh-pages, then tonic checkout you there and remove from there all (not dot-) files.
|
63
62
|
Then it will copy choosen template to this branch and run bundle install if it's needed.
|
64
63
|
|
data/lib/tonic/gh_pages.rb
CHANGED
@@ -28,14 +28,11 @@ module Tonic
|
|
28
28
|
abort 'You shall no pass. First you should delete gh-pages branch'
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
create template
|
37
|
-
commit_changes
|
38
|
-
end
|
31
|
+
check_status
|
32
|
+
create_branch
|
33
|
+
remove_all_files
|
34
|
+
create template
|
35
|
+
commit_changes
|
39
36
|
end
|
40
37
|
|
41
38
|
def create(template = nil)
|
data/lib/tonic/version.rb
CHANGED
data/spec/tonic/tonic_spec.rb
CHANGED
@@ -1,51 +1,56 @@
|
|
1
1
|
require 'tonic'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
describe Tonic do
|
4
|
+
context 'Tonic will' do
|
5
|
+
|
6
|
+
context "create gh-pages and" do
|
7
|
+
|
8
|
+
before :all do
|
9
|
+
unless Dir.pwd =~ /spec\/dummy_git_repo/
|
10
|
+
command = <<EOF
|
11
|
+
cd spec/dummy_git_repo;\
|
12
|
+
git init;\
|
13
|
+
git add .;\
|
14
|
+
git commit -am 'init commit';\
|
15
|
+
rspec ../../
|
16
|
+
EOF
|
17
|
+
exec command
|
18
|
+
end
|
19
|
+
end
|
6
20
|
|
7
|
-
|
21
|
+
it "copy there tonic-template" do
|
22
|
+
Tonic.activate []
|
8
23
|
|
9
|
-
|
10
|
-
are_you_in_repo?
|
24
|
+
Tonic::Shell.new('git branch').run.to_s.should =~ /\* gh-pages/
|
11
25
|
|
12
|
-
|
13
|
-
abort 'You shall no pass. First you should delete gh-pages branch'
|
14
|
-
end
|
26
|
+
Dir.glob('*').should == %w(assets Gemfile Gemfile.lock Rakefile)
|
15
27
|
|
16
|
-
|
17
|
-
# puts 'Do you really want to create gh-pages branch with tonic? [y/n]'
|
18
|
-
# if gets.chomp =~ /y/i
|
19
|
-
check_status
|
20
|
-
create_branch
|
21
|
-
remove_all_files
|
22
|
-
create template
|
23
|
-
commit_changes
|
24
|
-
# end
|
28
|
+
Tonic::Shell.new('git status -s').run.to_s.should == ""
|
25
29
|
end
|
26
30
|
|
27
|
-
|
28
|
-
|
29
|
-
end
|
31
|
+
it "copy there middleman template" do
|
32
|
+
Tonic.activate ['middleman']
|
30
33
|
|
31
|
-
|
32
|
-
context 'Tonic will' do
|
34
|
+
Tonic::Shell.new('git branch').run.to_s.should =~ /\* gh-pages/
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
Dir.glob('*').should == %w(config.rb source)
|
37
|
+
|
38
|
+
Tonic::Shell.new('git status -s').run.to_s.should == ""
|
39
|
+
end
|
40
|
+
|
41
|
+
after :each do
|
42
|
+
if Dir.pwd =~ /spec\/dummy_git_repo/
|
43
|
+
`git checkout master; git branch -D gh-pages`
|
44
|
+
end
|
41
45
|
end
|
42
|
-
end
|
43
46
|
|
44
|
-
if Dir.pwd =~ /spec\/dummy_git_repo/
|
45
47
|
after :all do
|
46
|
-
|
47
|
-
|
48
|
+
if Dir.pwd =~ /spec\/dummy_git_repo/
|
49
|
+
`rm -rf .git`
|
50
|
+
exec 'cd ../..'
|
51
|
+
end
|
48
52
|
end
|
53
|
+
|
49
54
|
end
|
50
55
|
|
51
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tonic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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-04-
|
12
|
+
date: 2012-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman
|
16
|
-
requirement: &
|
16
|
+
requirement: &70181926348940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70181926348940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: jekyll
|
27
|
-
requirement: &
|
27
|
+
requirement: &70181926347700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70181926347700
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70181926346820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70181926346820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &70181926344780 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70181926344780
|
58
58
|
description: You don't need to write your github pages in html and css anymore - now
|
59
59
|
it's simple to use your favorite technologies with tonic!
|
60
60
|
email:
|