rticles 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Gemfile +19 -0
- data/LICENSE.txt +661 -0
- data/README.md +52 -0
- data/Rakefile +30 -0
- data/lib/rticles.rb +8 -0
- data/lib/rticles/document.rb +200 -0
- data/lib/rticles/generators/install_generator.rb +18 -0
- data/lib/rticles/generators/templates/create_documents_and_paragraphs.rb +24 -0
- data/lib/rticles/numbering.rb +56 -0
- data/lib/rticles/paragraph.rb +315 -0
- data/lib/rticles/railtie.rb +5 -0
- data/lib/rticles/version.rb +3 -0
- data/lib/tasks/rticles_tasks.rake +4 -0
- data/rticles.gemspec +26 -0
- data/spec/document_spec.rb +193 -0
- data/spec/dummy/.gitignore +6 -0
- data/spec/dummy/.rspec +1 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/javascripts/documents.js +25 -0
- data/spec/dummy/app/assets/stylesheets/application.css.sass +30 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/documents_controller.rb +51 -0
- data/spec/dummy/app/controllers/paragraphs_controller.rb +76 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/documents_helper.rb +2 -0
- data/spec/dummy/app/helpers/paragraphs_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/documents/edit.html.haml +16 -0
- data/spec/dummy/app/views/documents/index.html.haml +8 -0
- data/spec/dummy/app/views/documents/new.html.haml +9 -0
- data/spec/dummy/app/views/documents/show.html.haml +7 -0
- data/spec/dummy/app/views/layouts/application.html.haml +13 -0
- data/spec/dummy/app/views/paragraphs/_form.html.haml +8 -0
- data/spec/dummy/app/views/paragraphs/_paragraph.html.haml +21 -0
- data/spec/dummy/app/views/paragraphs/_paragraph_internal.html.haml +18 -0
- data/spec/dummy/app/views/paragraphs/edit.html.haml +7 -0
- data/spec/dummy/app/views/paragraphs/new.html.haml +7 -0
- data/spec/dummy/app/views/paragraphs/update.js.erb +1 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +14 -0
- data/spec/dummy/db/migrate/20120828203449_create_documents_and_paragraphs.rb +24 -0
- data/spec/dummy/db/schema.rb +35 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/fixtures/constitution.yml +31 -0
- data/spec/fixtures/ips.yml +484 -0
- data/spec/fixtures/simple.yml +5 -0
- data/spec/paragraph_spec.rb +251 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/custom_matchers.rb +1 -0
- data/spec/support/document_macros.rb +30 -0
- metadata +220 -0
@@ -0,0 +1,251 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Rticles::Paragraph do
|
4
|
+
include DocumentMacros
|
5
|
+
|
6
|
+
describe "top-level positioning" do
|
7
|
+
before(:each) do
|
8
|
+
@document = Rticles::Document.create
|
9
|
+
end
|
10
|
+
|
11
|
+
it "is assigned correctly when pushing paragraphs to a document" do
|
12
|
+
paragraphs = Array.new(4){Rticles::Paragraph.new}
|
13
|
+
paragraphs.each{|p| @document.top_level_paragraphs.push(p)}
|
14
|
+
@document.save
|
15
|
+
@document.reload
|
16
|
+
@document.top_level_paragraphs.map(&:position).should == [1, 2, 3, 4]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "child paragraphs" do
|
21
|
+
before(:each) do
|
22
|
+
@document = Rticles::Document.create
|
23
|
+
@paragraph = @document.top_level_paragraphs.create
|
24
|
+
end
|
25
|
+
|
26
|
+
it "are assigned parentage when pushing child paragraphs to a parent paragraph" do
|
27
|
+
child = Rticles::Paragraph.new
|
28
|
+
@paragraph.children.push(child)
|
29
|
+
child.reload
|
30
|
+
child.parent_id.should == @paragraph.id
|
31
|
+
end
|
32
|
+
|
33
|
+
it "are associated with their parent's document" do
|
34
|
+
child = Rticles::Paragraph.new
|
35
|
+
@paragraph.children.push(child)
|
36
|
+
child.reload
|
37
|
+
child.document_id.should == @document.id
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "inserting paragraphs" do
|
42
|
+
before(:each) do
|
43
|
+
@document = Rticles::Document.create
|
44
|
+
3.times{|i| @document.top_level_paragraphs.create(:body => "Originally #{i + 1}")}
|
45
|
+
end
|
46
|
+
|
47
|
+
it "inserts a paragraph at the top" do
|
48
|
+
paragraph = @document.paragraphs.build(:body => "New", :before_id => @document.top_level_paragraphs.first.id)
|
49
|
+
paragraph.save!
|
50
|
+
@document.reload
|
51
|
+
@document.top_level_paragraphs.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
52
|
+
[nil, 1, "New"],
|
53
|
+
[nil, 2, "Originally 1"],
|
54
|
+
[nil, 3, "Originally 2"],
|
55
|
+
[nil, 4, "Originally 3"]
|
56
|
+
]
|
57
|
+
end
|
58
|
+
|
59
|
+
it "inserts a paragraph at the bottom" do
|
60
|
+
paragraph = @document.paragraphs.build(:body => "New", :after_id => @document.top_level_paragraphs.last.id)
|
61
|
+
paragraph.save!
|
62
|
+
@document.reload
|
63
|
+
@document.top_level_paragraphs.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
64
|
+
[nil, 1, "Originally 1"],
|
65
|
+
[nil, 2, "Originally 2"],
|
66
|
+
[nil, 3, "Originally 3"],
|
67
|
+
[nil, 4, "New"]
|
68
|
+
]
|
69
|
+
end
|
70
|
+
|
71
|
+
it "inserts a paragraph in the middle" do
|
72
|
+
paragraph = @document.paragraphs.build(:body => "New", :before_id => @document.top_level_paragraphs[1].id)
|
73
|
+
paragraph.save!
|
74
|
+
@document.reload
|
75
|
+
@document.top_level_paragraphs.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
76
|
+
[nil, 1, "Originally 1"],
|
77
|
+
[nil, 2, "New"],
|
78
|
+
[nil, 3, "Originally 2"],
|
79
|
+
[nil, 4, "Originally 3"]
|
80
|
+
]
|
81
|
+
end
|
82
|
+
|
83
|
+
context "into a list of children" do
|
84
|
+
before(:each) do
|
85
|
+
@first_top_paragraph = @document.top_level_paragraphs.first
|
86
|
+
3.times{|i| @document.paragraphs.create(:parent_id => @first_top_paragraph.id, :body => "Child originally #{i + 1}")}
|
87
|
+
end
|
88
|
+
|
89
|
+
it "inserts a paragraph at the top" do
|
90
|
+
paragraph = @document.paragraphs.build(:body => "New", :before_id => @first_top_paragraph.children.first.id)
|
91
|
+
paragraph.save!
|
92
|
+
@first_top_paragraph.reload
|
93
|
+
@first_top_paragraph.children.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
94
|
+
[@first_top_paragraph.id, 1, "New"],
|
95
|
+
[@first_top_paragraph.id, 2, "Child originally 1"],
|
96
|
+
[@first_top_paragraph.id, 3, "Child originally 2"],
|
97
|
+
[@first_top_paragraph.id, 4, "Child originally 3"]
|
98
|
+
]
|
99
|
+
end
|
100
|
+
|
101
|
+
it "inserts a paragraph at the bottom" do
|
102
|
+
paragraph = @document.paragraphs.build(:body => "New", :after_id => @first_top_paragraph.children.last.id)
|
103
|
+
paragraph.save!
|
104
|
+
@first_top_paragraph.reload
|
105
|
+
@first_top_paragraph.children.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
106
|
+
[@first_top_paragraph.id, 1, "Child originally 1"],
|
107
|
+
[@first_top_paragraph.id, 2, "Child originally 2"],
|
108
|
+
[@first_top_paragraph.id, 3, "Child originally 3"],
|
109
|
+
[@first_top_paragraph.id, 4, "New"]
|
110
|
+
]
|
111
|
+
end
|
112
|
+
|
113
|
+
it "inserts a paragraph in the middle" do
|
114
|
+
paragraph = @document.paragraphs.build(:body => "New", :before_id => @first_top_paragraph.children[1].id)
|
115
|
+
paragraph.save!
|
116
|
+
@first_top_paragraph.reload
|
117
|
+
@first_top_paragraph.children.map{|p| [p.parent_id, p.position, p.body]}.should == [
|
118
|
+
[@first_top_paragraph.id, 1, "Child originally 1"],
|
119
|
+
[@first_top_paragraph.id, 2, "New"],
|
120
|
+
[@first_top_paragraph.id, 3, "Child originally 2"],
|
121
|
+
[@first_top_paragraph.id, 4, "Child originally 3"]
|
122
|
+
]
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
describe "deleting" do
|
128
|
+
it "deletes its children" do
|
129
|
+
@document = Rticles::Document.create
|
130
|
+
@tlp = @document.top_level_paragraphs.create(:body => "top-level")
|
131
|
+
3.times{@document.paragraphs.create(:parent_id => @tlp.id)}
|
132
|
+
@document.paragraphs.map{|p| [p.parent_id, p.position]}.should eq [
|
133
|
+
[nil, 1],
|
134
|
+
[@tlp.id, 1],
|
135
|
+
[@tlp.id, 2],
|
136
|
+
[@tlp.id, 3]
|
137
|
+
]
|
138
|
+
|
139
|
+
@document.paragraphs.count.should eq 4
|
140
|
+
@document.reload.top_level_paragraphs.first.destroy
|
141
|
+
@document.reload.paragraphs.count.should == 0
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
describe "indenting" do
|
146
|
+
it "makes the paragraph a child of its previous sibling" do
|
147
|
+
stub_outline([:one, :two])
|
148
|
+
@document.top_level_paragraphs[1].indent!
|
149
|
+
@document.reload.outline.should == ['one', ['two']]
|
150
|
+
end
|
151
|
+
|
152
|
+
it "goes at the bottom of the previous sibling's children" do
|
153
|
+
stub_outline([:one, [:sub_one, :sub_two], :two])
|
154
|
+
@document.top_level_paragraphs[1].indent!
|
155
|
+
@document.reload.outline.should == ['one', ['sub_one', 'sub_two', 'two']]
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe "outdenting" do
|
160
|
+
it "inserts itself back into its parent's level" do
|
161
|
+
stub_outline([:one, [:two]])
|
162
|
+
@document.top_level_paragraphs[0].children[0].outdent!
|
163
|
+
@document.reload.outline.should == ['one', 'two']
|
164
|
+
end
|
165
|
+
|
166
|
+
it "splits its siblings" do
|
167
|
+
stub_outline [:one, [:sub_one, :sub_two, :sub_three], :two]
|
168
|
+
@document.top_level_paragraphs[0].children[1].outdent!
|
169
|
+
@document.reload.outline.should == ['one', ['sub_one'], 'sub_two', ['sub_three'], 'two']
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe "index" do
|
174
|
+
before(:each) do
|
175
|
+
@document = Rticles::Document.create
|
176
|
+
@document.top_level_paragraphs.create(:body => 'one')
|
177
|
+
@document.top_level_paragraphs.create(:body => 'Heading one', :heading => 1)
|
178
|
+
@document.top_level_paragraphs.create(:body => 'two')
|
179
|
+
@document.top_level_paragraphs.create(:body => '#rticles#false#choice Optional paragraph')
|
180
|
+
@document.top_level_paragraphs.create(:body => 'three')
|
181
|
+
|
182
|
+
@document.choices[:choice] = true
|
183
|
+
end
|
184
|
+
|
185
|
+
it "ignores headings" do
|
186
|
+
@document.paragraphs[0].index.should eq 1
|
187
|
+
@document.paragraphs[2].index.should eq 2
|
188
|
+
end
|
189
|
+
|
190
|
+
it "returns nil for headings" do
|
191
|
+
@document.paragraphs[1].index.should be_nil
|
192
|
+
end
|
193
|
+
|
194
|
+
it "ignores paragraphs omitted by choices" do
|
195
|
+
@document.paragraphs[4].index(@document.choices).should eq 3
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
describe "generating HTML" do
|
200
|
+
before(:each) do
|
201
|
+
@document = Rticles::Document.create
|
202
|
+
@document.top_level_paragraphs.create(:body => "A Simple Constitution", :heading => 1)
|
203
|
+
@document.top_level_paragraphs.create(:body => "For demonstration purposes only", :heading => 2, :continuation => true)
|
204
|
+
|
205
|
+
@document.top_level_paragraphs.create(:body => "This is the first rule.")
|
206
|
+
|
207
|
+
p = @document.top_level_paragraphs.create(:body => "This is the second rule, which applies when:")
|
208
|
+
@document.paragraphs.create(:body => "This condition;", :parent_id => p.id)
|
209
|
+
@document.paragraphs.create(:body => "and this condition.", :parent_id => p.id)
|
210
|
+
@document.top_level_paragraphs.create(:body => "except when it is a Full Moon.", :continuation => true)
|
211
|
+
|
212
|
+
@document.top_level_paragraphs.create(:body => "This is the third rule.")
|
213
|
+
|
214
|
+
@document.top_level_paragraphs.create(:body => "This is the fourth rule.")
|
215
|
+
@document.top_level_paragraphs.create(:body => "And finally...", :heading => 2)
|
216
|
+
@document.top_level_paragraphs.create(:body => "This is the final rule.")
|
217
|
+
end
|
218
|
+
|
219
|
+
it "works" do
|
220
|
+
expected_html = <<-EOF
|
221
|
+
<section>
|
222
|
+
<hgroup>
|
223
|
+
<h1>A Simple Constitution</h1>
|
224
|
+
<h2>For demonstration purposes only</h2>
|
225
|
+
</hgroup>
|
226
|
+
<ol>
|
227
|
+
<li>1 This is the first rule.</li>
|
228
|
+
<li>
|
229
|
+
2 This is the second rule, which applies when:
|
230
|
+
<ol>
|
231
|
+
<li>2.1 This condition;</li>
|
232
|
+
<li>2.2 and this condition.</li>
|
233
|
+
</ol>
|
234
|
+
except when it is a Full Moon.
|
235
|
+
</li>
|
236
|
+
<li>3 This is the third rule.</li>
|
237
|
+
<li>4 This is the fourth rule.</li>
|
238
|
+
</ol>
|
239
|
+
<h2>And finally...</h2>
|
240
|
+
<ol>
|
241
|
+
<li>5 This is the final rule.</li>
|
242
|
+
</ol>
|
243
|
+
</section>
|
244
|
+
EOF
|
245
|
+
|
246
|
+
html = @document.to_html
|
247
|
+
|
248
|
+
html.should be_equivalent_to(expected_html)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
|
+
require 'rspec/rails'
|
5
|
+
require 'rspec/autorun'
|
6
|
+
|
7
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
8
|
+
# in spec/support/ and its subdirectories.
|
9
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
# ## Mock Framework
|
13
|
+
#
|
14
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
15
|
+
#
|
16
|
+
# config.mock_with :mocha
|
17
|
+
# config.mock_with :flexmock
|
18
|
+
# config.mock_with :rr
|
19
|
+
|
20
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
21
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
22
|
+
|
23
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
24
|
+
# examples within a transaction, remove the following line or assign false
|
25
|
+
# instead of true.
|
26
|
+
config.use_transactional_fixtures = true
|
27
|
+
|
28
|
+
# If true, the base class of anonymous controllers will be inferred
|
29
|
+
# automatically. This will be the default behavior in future versions of
|
30
|
+
# rspec-rails.
|
31
|
+
config.infer_base_class_for_anonymous_controllers = false
|
32
|
+
|
33
|
+
# Run specs in random order to surface order dependencies. If you find an
|
34
|
+
# order dependency and want to debug it, you can fix the order by providing
|
35
|
+
# the seed, which is printed after each run.
|
36
|
+
# --seed 1234
|
37
|
+
config.order = "random"
|
38
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'equivalent-xml/rspec_matchers'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module DocumentMacros
|
2
|
+
def stub_outline(outline=[])
|
3
|
+
@document ||= Rticles::Document.create
|
4
|
+
i = 0
|
5
|
+
while i < outline.length
|
6
|
+
tlp = @document.top_level_paragraphs.create(:body => outline[i].to_s)
|
7
|
+
if outline[i + 1].is_a?(Array)
|
8
|
+
stub_child_paragraphs(tlp, outline[i + 1])
|
9
|
+
i += 2
|
10
|
+
else
|
11
|
+
i += 1
|
12
|
+
end
|
13
|
+
end
|
14
|
+
@document
|
15
|
+
end
|
16
|
+
|
17
|
+
def stub_child_paragraphs(p, outline)
|
18
|
+
document = p.document
|
19
|
+
i = 0
|
20
|
+
while i < outline.length
|
21
|
+
sp = document.paragraphs.create(:body => outline[i].to_s, :parent_id => p.id)
|
22
|
+
if outline[i + 1].is_a?(Array)
|
23
|
+
stub_child_paragraphs(sp, outline[i + 1])
|
24
|
+
i += 2
|
25
|
+
else
|
26
|
+
i += 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rticles
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Mear
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.8
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.8
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: acts_as_list
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.8
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.8
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: roman-numerals
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.3.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: equivalent-xml
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Rticles is a Rails plugin that allows for web-based editing of legal
|
112
|
+
documents. It lets you create nested, numbered paragraphs, along with intra-document
|
113
|
+
references that remain accurate as paragraphs are inserted, removed and moved.
|
114
|
+
email:
|
115
|
+
- getinvolved@oneclickorgs.com
|
116
|
+
executables: []
|
117
|
+
extensions: []
|
118
|
+
extra_rdoc_files: []
|
119
|
+
files:
|
120
|
+
- .gitignore
|
121
|
+
- .rspec
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- doc/TODO.txt
|
128
|
+
- lib/rticles.rb
|
129
|
+
- lib/rticles/document.rb
|
130
|
+
- lib/rticles/generators/install_generator.rb
|
131
|
+
- lib/rticles/generators/templates/create_documents_and_paragraphs.rb
|
132
|
+
- lib/rticles/numbering.rb
|
133
|
+
- lib/rticles/paragraph.rb
|
134
|
+
- lib/rticles/railtie.rb
|
135
|
+
- lib/rticles/version.rb
|
136
|
+
- lib/tasks/rticles_tasks.rake
|
137
|
+
- rticles.gemspec
|
138
|
+
- spec/document_spec.rb
|
139
|
+
- spec/dummy/.gitignore
|
140
|
+
- spec/dummy/.rspec
|
141
|
+
- spec/dummy/README.rdoc
|
142
|
+
- spec/dummy/Rakefile
|
143
|
+
- spec/dummy/app/assets/javascripts/application.js
|
144
|
+
- spec/dummy/app/assets/javascripts/documents.js
|
145
|
+
- spec/dummy/app/assets/stylesheets/application.css.sass
|
146
|
+
- spec/dummy/app/controllers/application_controller.rb
|
147
|
+
- spec/dummy/app/controllers/documents_controller.rb
|
148
|
+
- spec/dummy/app/controllers/paragraphs_controller.rb
|
149
|
+
- spec/dummy/app/helpers/application_helper.rb
|
150
|
+
- spec/dummy/app/helpers/documents_helper.rb
|
151
|
+
- spec/dummy/app/helpers/paragraphs_helper.rb
|
152
|
+
- spec/dummy/app/mailers/.gitkeep
|
153
|
+
- spec/dummy/app/models/.gitkeep
|
154
|
+
- spec/dummy/app/views/documents/edit.html.haml
|
155
|
+
- spec/dummy/app/views/documents/index.html.haml
|
156
|
+
- spec/dummy/app/views/documents/new.html.haml
|
157
|
+
- spec/dummy/app/views/documents/show.html.haml
|
158
|
+
- spec/dummy/app/views/layouts/application.html.haml
|
159
|
+
- spec/dummy/app/views/paragraphs/_form.html.haml
|
160
|
+
- spec/dummy/app/views/paragraphs/_paragraph.html.haml
|
161
|
+
- spec/dummy/app/views/paragraphs/_paragraph_internal.html.haml
|
162
|
+
- spec/dummy/app/views/paragraphs/edit.html.haml
|
163
|
+
- spec/dummy/app/views/paragraphs/new.html.haml
|
164
|
+
- spec/dummy/app/views/paragraphs/update.js.erb
|
165
|
+
- spec/dummy/config.ru
|
166
|
+
- spec/dummy/config/application.rb
|
167
|
+
- spec/dummy/config/boot.rb
|
168
|
+
- spec/dummy/config/database.yml
|
169
|
+
- spec/dummy/config/environment.rb
|
170
|
+
- spec/dummy/config/environments/development.rb
|
171
|
+
- spec/dummy/config/environments/production.rb
|
172
|
+
- spec/dummy/config/environments/test.rb
|
173
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
174
|
+
- spec/dummy/config/initializers/inflections.rb
|
175
|
+
- spec/dummy/config/initializers/mime_types.rb
|
176
|
+
- spec/dummy/config/initializers/secret_token.rb
|
177
|
+
- spec/dummy/config/initializers/session_store.rb
|
178
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
179
|
+
- spec/dummy/config/locales/en.yml
|
180
|
+
- spec/dummy/config/routes.rb
|
181
|
+
- spec/dummy/db/migrate/20120828203449_create_documents_and_paragraphs.rb
|
182
|
+
- spec/dummy/db/schema.rb
|
183
|
+
- spec/dummy/lib/assets/.gitkeep
|
184
|
+
- spec/dummy/log/.gitkeep
|
185
|
+
- spec/dummy/public/404.html
|
186
|
+
- spec/dummy/public/422.html
|
187
|
+
- spec/dummy/public/500.html
|
188
|
+
- spec/dummy/public/favicon.ico
|
189
|
+
- spec/dummy/script/rails
|
190
|
+
- spec/fixtures/constitution.yml
|
191
|
+
- spec/fixtures/ips.yml
|
192
|
+
- spec/fixtures/simple.yml
|
193
|
+
- spec/paragraph_spec.rb
|
194
|
+
- spec/spec_helper.rb
|
195
|
+
- spec/support/custom_matchers.rb
|
196
|
+
- spec/support/document_macros.rb
|
197
|
+
homepage: https://github.com/oneclickorgs/rticles
|
198
|
+
licenses: []
|
199
|
+
metadata: {}
|
200
|
+
post_install_message:
|
201
|
+
rdoc_options: []
|
202
|
+
require_paths:
|
203
|
+
- lib
|
204
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ! '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - ! '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
requirements: []
|
215
|
+
rubyforge_project:
|
216
|
+
rubygems_version: 2.0.3
|
217
|
+
signing_key:
|
218
|
+
specification_version: 4
|
219
|
+
summary: Consistent editing for legal documents.
|
220
|
+
test_files: []
|