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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gollum_rails (0.0.2.5)
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.3)
124
- rack (~> 1.3, >= 1.3.6)
125
- rack-protection (~> 1.2)
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
+ [![Build Status](https://travis-ci.org/nirnanaaa/gollum_rails.png?branch=master)](https://travis-ci.org/nirnanaaa/gollum_rails)
4
+ [![Dependency Status](https://gemnasium.com/nirnanaaa/gollum_rails.png)](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.5'
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.9'
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
@@ -5,7 +5,7 @@ require 'gollum'
5
5
 
6
6
  module Gollum
7
7
  module Rails
8
- VERSION = '0.0.2.5'
8
+ VERSION = '0.0.2.6'
9
9
  require 'gollum_rails/engine' if defined?(Rails)
10
10
  end
11
11
  end
@@ -0,0 +1,9 @@
1
+ module GollumRails
2
+ class File
3
+ def initialize
4
+
5
+ end
6
+ #def static('')
7
+ #end
8
+ end
9
+ end
@@ -3,4 +3,6 @@ require 'gollum_rails/config'
3
3
  require "gollum_rails/dependency_injector"
4
4
  require "gollum_rails/wiki"
5
5
  require "gollum_rails/page"
6
+ require 'gollum_rails/file'
7
+ require 'gollum_rails/versions'
6
8
  require 'gollum_rails/validations'
@@ -17,9 +17,9 @@ module GollumRails
17
17
  # Public: Gets/Sets the format of the document
18
18
  #
19
19
  # Examples
20
- # Page.format = :creole
21
- # #or
22
- # Page.format = :markdown
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
- # message: 'page created',
52
- # name: 'Florian Kasper',
53
- # email: 'nirnanaaa@khnetworks.com'
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.5
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: '1.9'
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: 658049395
220
+ hash: 380323827
221
221
  requirements: []
222
222
  rubyforge_project:
223
223
  rubygems_version: 1.8.23