gollum_rails 1.4.0.rc1 → 1.4.0.rc2
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 +2 -1
- data/HISTORY.md +91 -91
- data/LICENSE +661 -661
- data/README.md +74 -74
- data/Rakefile +170 -170
- data/gollum_rails.gemspec +1 -1
- data/lib/core_ext/string.rb +7 -10
- 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 +1 -1
- 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/modules/hash.rb +33 -33
- data/lib/gollum_rails/modules/loader.rb +5 -5
- 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/modules/hash_spec.rb +31 -31
- 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/spec.opts +3 -3
- data/spec/spec_helper.rb +43 -43
- metadata +2 -2
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.rc2
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|