gollum_rails 1.4.0.rc2 → 1.4.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -6
- data/Gemfile.lock +7 -10
- data/HISTORY.md +91 -91
- data/LICENSE +661 -661
- data/README.md +74 -74
- data/Rakefile +170 -170
- data/gollum_rails.gemspec +6 -4
- data/lib/core_ext/string.rb +3 -7
- data/lib/generators/gollum_rails/install/install_generator.rb +27 -27
- data/lib/generators/gollum_rails/install/templates/gollum_initializer.rb +22 -22
- data/lib/generators/gollum_rails/language/language_generator.rb +81 -81
- data/lib/generators/gollum_rails/model/model_generator.rb +51 -51
- data/lib/generators/gollum_rails/model/templates/model_template.erb +13 -13
- data/lib/gollum_rails.rb +26 -6
- data/lib/gollum_rails/adapters/activemodel.rb +36 -36
- data/lib/gollum_rails/adapters/activemodel/boolean.rb +15 -15
- data/lib/gollum_rails/adapters/activemodel/error.rb +27 -27
- data/lib/gollum_rails/adapters/activemodel/naming.rb +42 -42
- data/lib/gollum_rails/adapters/gollum.rb +54 -54
- data/lib/gollum_rails/adapters/gollum/.gitkeep +0 -0
- data/lib/gollum_rails/adapters/gollum/error.rb +19 -19
- data/lib/gollum_rails/adapters/gollum/page.rb +177 -177
- data/lib/gollum_rails/adapters/gollum/wiki.rb +42 -42
- data/lib/gollum_rails/page.rb +266 -266
- data/lib/gollum_rails/setup.rb +81 -81
- data/lib/grit/git-ruby/internal/pack.rb +397 -397
- data/spec/gollum_rails/adapters/activemodel/error_spec.rb +11 -11
- data/spec/gollum_rails/adapters/activemodel/naming_spec.rb +27 -27
- data/spec/gollum_rails/adapters/activemodel/validation_unused.rb +102 -102
- data/spec/gollum_rails/adapters/gollum/committer_spec.rb +0 -0
- data/spec/gollum_rails/adapters/gollum/connector_spec.rb +15 -15
- data/spec/gollum_rails/adapters/gollum/error_spec.rb +7 -7
- data/spec/gollum_rails/adapters/gollum/page_spec.rb +89 -89
- data/spec/gollum_rails/adapters/gollum/wiki_spec.rb +27 -27
- data/spec/gollum_rails/error_spec.rb +10 -0
- data/spec/gollum_rails/page_spec.rb +207 -207
- data/spec/gollum_rails/respository_spec.rb +0 -0
- data/spec/gollum_rails/setup_spec.rb +44 -44
- data/spec/gollum_rails/wiki_spec.rb +0 -0
- data/spec/gollum_rails_spec.rb +9 -0
- data/spec/spec.opts +3 -3
- data/spec/spec_helper.rb +43 -43
- metadata +4 -5
- data/lib/gollum_rails/modules/hash.rb +0 -33
- data/lib/gollum_rails/modules/loader.rb +0 -5
- data/spec/gollum_rails/modules/hash_spec.rb +0 -31
File without changes
|
@@ -1,44 +1,44 @@
|
|
1
|
-
# Setup testing
|
2
|
-
require 'spec_helper'
|
3
|
-
require 'rails'
|
4
|
-
describe GollumRails::Setup do
|
5
|
-
it "should setup the application" do
|
6
|
-
GollumRails::Setup.build do |setup|
|
7
|
-
|
8
|
-
# => The repository path to the
|
9
|
-
#
|
10
|
-
#
|
11
|
-
setup.repository = '.'
|
12
|
-
|
13
|
-
#setup.wiki.use = :default
|
14
|
-
setup.startup=(true).should be_true
|
15
|
-
|
16
|
-
setup.repository = nil
|
17
|
-
expect{setup.startup=true}.to raise_error GollumRails::GollumInternalError
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
class Bla < GollumRails::Page
|
24
|
-
end
|
25
|
-
it "should test the disable behavior" do
|
26
|
-
GollumRails::Adapters::Gollum::Connector.enabled = false
|
27
|
-
|
28
|
-
committer = {
|
29
|
-
:name => "Flo",
|
30
|
-
:message => "no",
|
31
|
-
:email => "mosny@zyg.li"
|
32
|
-
}
|
33
|
-
|
34
|
-
expect{Bla.new :name => "Default page", :commit => committer, :content => "#title \n ##body", :format => :markdown}.to raise_error GollumRails::GollumInternalError
|
35
|
-
end
|
36
|
-
it "should test the applications config" do
|
37
|
-
GollumRails::Setup.build do |config|
|
38
|
-
config.repository = :application
|
39
|
-
|
40
|
-
expect{setup.startup=true}.to raise_error
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
1
|
+
# Setup testing
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'rails'
|
4
|
+
describe GollumRails::Setup do
|
5
|
+
it "should setup the application" do
|
6
|
+
GollumRails::Setup.build do |setup|
|
7
|
+
|
8
|
+
# => The repository path to the
|
9
|
+
#
|
10
|
+
#
|
11
|
+
setup.repository = '.'
|
12
|
+
|
13
|
+
#setup.wiki.use = :default
|
14
|
+
setup.startup=(true).should be_true
|
15
|
+
|
16
|
+
setup.repository = nil
|
17
|
+
expect{setup.startup=true}.to raise_error GollumRails::GollumInternalError
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
end
|
23
|
+
class Bla < GollumRails::Page
|
24
|
+
end
|
25
|
+
it "should test the disable behavior" do
|
26
|
+
GollumRails::Adapters::Gollum::Connector.enabled = false
|
27
|
+
|
28
|
+
committer = {
|
29
|
+
:name => "Flo",
|
30
|
+
:message => "no",
|
31
|
+
:email => "mosny@zyg.li"
|
32
|
+
}
|
33
|
+
|
34
|
+
expect{Bla.new :name => "Default page", :commit => committer, :content => "#title \n ##body", :format => :markdown}.to raise_error GollumRails::GollumInternalError
|
35
|
+
end
|
36
|
+
it "should test the applications config" do
|
37
|
+
GollumRails::Setup.build do |config|
|
38
|
+
config.repository = :application
|
39
|
+
|
40
|
+
expect{setup.startup=true}.to raise_error
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
File without changes
|
data/spec/spec.opts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--color
|
2
|
-
--format progress
|
3
|
-
|
1
|
+
--color
|
2
|
+
--format progress
|
3
|
+
|
data/spec/spec_helper.rb
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
|
-
require 'coveralls'
|
5
|
-
Coveralls.wear!
|
6
|
-
|
7
|
-
require 'gollum_rails'
|
8
|
-
|
9
|
-
|
10
|
-
require 'benchmark'
|
11
|
-
RSpec::Matchers.define :take_less_than do |n|
|
12
|
-
chain :seconds do; end
|
13
|
-
match do |block|
|
14
|
-
@elapsed = Benchmark.realtime do
|
15
|
-
block.call
|
16
|
-
end
|
17
|
-
@elapsed <= n
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
RSpec.configure do |config|
|
22
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
23
|
-
|
24
|
-
config.backtrace_clean_patterns = [
|
25
|
-
/\/lib\d*\/ruby\//,
|
26
|
-
/bin\//,
|
27
|
-
/gems/,
|
28
|
-
/spec\/spec_helper\.rb/,
|
29
|
-
/lib\/rspec\/(core|expectations|matchers|mocks)/
|
30
|
-
]
|
31
|
-
config.before(:each) do
|
32
|
-
GollumRails::Adapters::Gollum::Connector.enabled = true
|
33
|
-
end
|
34
|
-
config.full_backtrace= false # save the console
|
35
|
-
config.color_enabled= true # save your eyes
|
36
|
-
config.formatter = :documentation
|
37
|
-
|
38
|
-
config.mock_with :rr
|
39
|
-
|
40
|
-
config.before(:each) do
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'coveralls'
|
5
|
+
Coveralls.wear!
|
6
|
+
|
7
|
+
require 'gollum_rails'
|
8
|
+
|
9
|
+
|
10
|
+
require 'benchmark'
|
11
|
+
RSpec::Matchers.define :take_less_than do |n|
|
12
|
+
chain :seconds do; end
|
13
|
+
match do |block|
|
14
|
+
@elapsed = Benchmark.realtime do
|
15
|
+
block.call
|
16
|
+
end
|
17
|
+
@elapsed <= n
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
23
|
+
|
24
|
+
config.backtrace_clean_patterns = [
|
25
|
+
/\/lib\d*\/ruby\//,
|
26
|
+
/bin\//,
|
27
|
+
/gems/,
|
28
|
+
/spec\/spec_helper\.rb/,
|
29
|
+
/lib\/rspec\/(core|expectations|matchers|mocks)/
|
30
|
+
]
|
31
|
+
config.before(:each) do
|
32
|
+
GollumRails::Adapters::Gollum::Connector.enabled = true
|
33
|
+
end
|
34
|
+
config.full_backtrace= false # save the console
|
35
|
+
config.color_enabled= true # save your eyes
|
36
|
+
config.formatter = :documentation
|
37
|
+
|
38
|
+
config.mock_with :rr
|
39
|
+
|
40
|
+
config.before(:each) do
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.
|
4
|
+
version: 1.4.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Kasper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -109,8 +109,6 @@ files:
|
|
109
109
|
- lib/gollum_rails/adapters/gollum/error.rb
|
110
110
|
- lib/gollum_rails/adapters/gollum/page.rb
|
111
111
|
- lib/gollum_rails/adapters/gollum/wiki.rb
|
112
|
-
- lib/gollum_rails/modules/hash.rb
|
113
|
-
- lib/gollum_rails/modules/loader.rb
|
114
112
|
- lib/gollum_rails/page.rb
|
115
113
|
- lib/gollum_rails/setup.rb
|
116
114
|
- lib/grit/git-ruby/internal/pack.rb
|
@@ -122,11 +120,12 @@ files:
|
|
122
120
|
- spec/gollum_rails/adapters/gollum/error_spec.rb
|
123
121
|
- spec/gollum_rails/adapters/gollum/page_spec.rb
|
124
122
|
- spec/gollum_rails/adapters/gollum/wiki_spec.rb
|
125
|
-
- spec/gollum_rails/
|
123
|
+
- spec/gollum_rails/error_spec.rb
|
126
124
|
- spec/gollum_rails/page_spec.rb
|
127
125
|
- spec/gollum_rails/respository_spec.rb
|
128
126
|
- spec/gollum_rails/setup_spec.rb
|
129
127
|
- spec/gollum_rails/wiki_spec.rb
|
128
|
+
- spec/gollum_rails_spec.rb
|
130
129
|
- spec/spec.opts
|
131
130
|
- spec/spec_helper.rb
|
132
131
|
homepage: http://gollum.zyg.li
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# See http://ruby-doc.org/core-2.0/Hash.html for further information
|
2
|
-
#
|
3
|
-
# Extended methods:
|
4
|
-
# * object support
|
5
|
-
# * setter
|
6
|
-
# * hash setter
|
7
|
-
# * isset
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# TODO
|
11
|
-
# * implement is? method
|
12
|
-
# * improve testing
|
13
|
-
#
|
14
|
-
class ::Hash
|
15
|
-
|
16
|
-
|
17
|
-
# Public: Converts a method . into an Hash element
|
18
|
-
#
|
19
|
-
# Examples
|
20
|
-
# hash = {a: "b", b: "c", c: "d"}
|
21
|
-
# hash.a
|
22
|
-
# # => "b"
|
23
|
-
# # hash.b
|
24
|
-
# # => "c"
|
25
|
-
#
|
26
|
-
# Returns an instance of Hash if the name is the key of a new hash
|
27
|
-
def method_missing(name, *args)
|
28
|
-
return self[name] if key? name
|
29
|
-
self.each { |k,v| return v if k.to_s.to_sym == name }
|
30
|
-
super.method_missing name
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe ::Hash do
|
4
|
-
before(:each) do
|
5
|
-
@hash_a = {:a => "b", :b => "c"}
|
6
|
-
@hash_b = {a: "b", b: "c"}
|
7
|
-
end
|
8
|
-
it "should initialize a new hash" do
|
9
|
-
@hash_a.should be_instance_of(Hash)
|
10
|
-
@hash_b.should be_instance_of(Hash)
|
11
|
-
@hash_b.should == @hash_a
|
12
|
-
@hash_b.a.should == @hash_b[:a]
|
13
|
-
@hash_b.b.should == @hash_b[:b]
|
14
|
-
@hash_b.a.should == @hash_a.a
|
15
|
-
@hash_b.b.should == @hash_a.b
|
16
|
-
end
|
17
|
-
it "should change the value by method missing" do
|
18
|
-
|
19
|
-
@hash_c = {:hooh => "c", :tripple => {:d => "d"}}
|
20
|
-
@hash_d = Hash.new
|
21
|
-
expect{@hash_d.x}.to raise_error
|
22
|
-
#@hash_a.d.to_s.should == "{ d: 'd', x: 'Hash.new' }"
|
23
|
-
#@hash_a.d.should be_instance_of(Hash)
|
24
|
-
#puts @hash_a.d
|
25
|
-
#expect{@hash_a.hash = {d:"d"}}.to be_equal Hash['{:a=>"b", :b=>"c", "b"=>[3], :d=>"d"}']
|
26
|
-
#puts @hash_a
|
27
|
-
#@hash_a.a = "other"
|
28
|
-
#puts @hash_a
|
29
|
-
#expect{@hash_a.a = "other"}.to be_equal "other"
|
30
|
-
end
|
31
|
-
end
|