gollum_rails 0.0.2.5 → 0.0.2.6
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/Gemfile.lock +4 -4
- data/README.md +9 -1
- data/gollum_rails.gemspec +3 -3
- data/lib/gollum_rails.rb +1 -1
- data/lib/gollum_rails/file.rb +9 -0
- data/lib/gollum_rails/gollum_rails.rb +2 -0
- data/lib/gollum_rails/page.rb +14 -12
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gollum_rails (0.0.2.
|
4
|
+
gollum_rails (0.0.2.6)
|
5
5
|
activemodel (~> 3.2.11)
|
6
6
|
builder (~> 3.0.0)
|
7
7
|
gollum (~> 2.4.11)
|
@@ -120,9 +120,9 @@ GEM
|
|
120
120
|
shoulda-matchers (1.4.2)
|
121
121
|
activesupport (>= 3.0.0)
|
122
122
|
bourne (~> 1.1.2)
|
123
|
-
sinatra (1.3.
|
124
|
-
rack (~> 1.
|
125
|
-
rack-protection (~> 1.
|
123
|
+
sinatra (1.3.4)
|
124
|
+
rack (~> 1.4)
|
125
|
+
rack-protection (~> 1.3)
|
126
126
|
tilt (~> 1.3, >= 1.3.3)
|
127
127
|
sprockets (2.2.2)
|
128
128
|
hike (~> 1.2)
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
Gollum for Rails
|
2
2
|
================
|
3
|
+
[](https://travis-ci.org/nirnanaaa/gollum_rails)
|
4
|
+
[](https://gemnasium.com/nirnanaaa/gollum_rails)
|
3
5
|
|
4
6
|
Gollum for Rails combines the benefits from gollum with the flexibility of Rails.
|
5
7
|
|
@@ -114,7 +116,13 @@ Thats it. Very easy. You can use also `page.save!` method.
|
|
114
116
|
:email => 'nirnanaaa@khnetworks.com'
|
115
117
|
}
|
116
118
|
|
117
|
-
|
119
|
+
**Preview a page (AJAX/or not)**
|
120
|
+
|
121
|
+
page = Page.new
|
122
|
+
preview = page.preview("testpage", "content") # or page.preview("testpage", "content", :format)
|
123
|
+
|
124
|
+
# preview contains the HTML rendered data!
|
125
|
+
|
118
126
|
## TODO
|
119
127
|
* List all pages
|
120
128
|
* Search pages
|
data/gollum_rails.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.rubygems_version = '1.3.5'
|
3
3
|
s.name = 'gollum_rails'
|
4
|
-
s.version = '0.0.2.
|
4
|
+
s.version = '0.0.2.6'
|
5
5
|
|
6
6
|
s.summary = 'Combines the benefits from Gollum with Rails'
|
7
7
|
s.description= 'use templating, authentication and so on'
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.email = 'nirnanaaa@khnetworks.com'
|
23
23
|
s.homepage = 'https://github.com/nirnanaaa/gollum_rails'
|
24
24
|
s.platform = Gem::Platform::RUBY
|
25
|
-
s.required_ruby_version = '>=1.
|
25
|
+
s.required_ruby_version = '>=1.8.7'
|
26
26
|
|
27
27
|
# = MANIFEST =
|
28
28
|
s.files = %w[
|
@@ -53,4 +53,4 @@ Gem::Specification.new do |s|
|
|
53
53
|
s.has_rdoc = true
|
54
54
|
s.rdoc_options = ["--charset=UTF-8"]
|
55
55
|
s.test_files = s.files.select { |path| path =~ /^test\/test_.*\.rb/ }
|
56
|
-
end
|
56
|
+
end
|
data/lib/gollum_rails.rb
CHANGED
data/lib/gollum_rails/file.rb
CHANGED
data/lib/gollum_rails/page.rb
CHANGED
@@ -17,9 +17,9 @@ module GollumRails
|
|
17
17
|
# Public: Gets/Sets the format of the document
|
18
18
|
#
|
19
19
|
# Examples
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
20
|
+
# Page.format = :creole
|
21
|
+
# #or
|
22
|
+
# Page.format = :markdown
|
23
23
|
#
|
24
24
|
# Possible formats are
|
25
25
|
# - :asciidoc
|
@@ -46,12 +46,12 @@ module GollumRails
|
|
46
46
|
# assume that this operation is part of batch of
|
47
47
|
# updates and the commit happens later.
|
48
48
|
#
|
49
|
-
# Examples
|
49
|
+
# Examples
|
50
50
|
# commit = {
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
51
|
+
# message: 'page created',
|
52
|
+
# name: 'Florian Kasper',
|
53
|
+
# email: 'nirnanaaa@khnetworks.com'
|
54
|
+
# }
|
55
55
|
#
|
56
56
|
attr_accessor :commit
|
57
57
|
|
@@ -73,16 +73,19 @@ module GollumRails
|
|
73
73
|
|
74
74
|
# Public: Gets ?!
|
75
75
|
attr_reader :class
|
76
|
+
|
76
77
|
# Public: Initializes a new Page instance
|
77
78
|
#
|
78
79
|
# attributes - A hash of attributes. See example
|
79
80
|
# options - Will be merged with the configuration
|
80
81
|
#
|
81
82
|
# Examples
|
83
|
+
#
|
82
84
|
# GollumRails::Page.new({name: '', content: '', format: '', commit: {}})
|
83
85
|
#
|
84
86
|
#
|
85
|
-
# Explanation
|
87
|
+
# Explanation
|
88
|
+
#
|
86
89
|
# name must be a string.
|
87
90
|
# content should be a text/String
|
88
91
|
# format must be eighter :markdown, :latex, :rdoc, ...
|
@@ -144,7 +147,6 @@ module GollumRails
|
|
144
147
|
end
|
145
148
|
|
146
149
|
# Public: saves this instance
|
147
|
-
|
148
150
|
def save
|
149
151
|
if valid?
|
150
152
|
begin
|
@@ -158,7 +160,7 @@ module GollumRails
|
|
158
160
|
return true
|
159
161
|
end
|
160
162
|
|
161
|
-
#rewrite for save() method with raising exceptions as well
|
163
|
+
# Public: rewrite for save() method with raising exceptions as well
|
162
164
|
def save!
|
163
165
|
saves = save
|
164
166
|
if @error
|
@@ -169,7 +171,7 @@ module GollumRails
|
|
169
171
|
|
170
172
|
end
|
171
173
|
|
172
|
-
# Updates an existing page
|
174
|
+
# Public: Updates an existing page
|
173
175
|
# usage:
|
174
176
|
#
|
175
177
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2.
|
4
|
+
version: 0.0.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -208,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
208
208
|
requirements:
|
209
209
|
- - ! '>='
|
210
210
|
- !ruby/object:Gem::Version
|
211
|
-
version:
|
211
|
+
version: 1.8.7
|
212
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
213
|
none: false
|
214
214
|
requirements:
|
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
217
|
version: '0'
|
218
218
|
segments:
|
219
219
|
- 0
|
220
|
-
hash:
|
220
|
+
hash: 380323827
|
221
221
|
requirements: []
|
222
222
|
rubyforge_project:
|
223
223
|
rubygems_version: 1.8.23
|