legal-docs 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +2 -0
- data/README.md +31 -21
- data/VERSION +1 -1
- data/legal-docs.gemspec +8 -4
- data/lib/{legal_docs.rb → legal-docs.rb} +5 -0
- data/locales/en.yml +34 -35
- data/spec/{legal_docs_spec.rb → legal-docs_spec.rb} +8 -0
- data/spec/spec_helper.rb +1 -1
- metadata +27 -15
data/.travis.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm: 1.9.3
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -22,6 +22,7 @@ GEM
|
|
22
22
|
rake (0.9.2.2)
|
23
23
|
rdoc (3.12)
|
24
24
|
json (~> 1.4)
|
25
|
+
redcarpet (2.1.1)
|
25
26
|
rest-client (1.6.7)
|
26
27
|
mime-types (>= 1.16)
|
27
28
|
rspec (2.8.0)
|
@@ -42,4 +43,5 @@ DEPENDENCIES
|
|
42
43
|
i18n-spec
|
43
44
|
jeweler (~> 1.8.3)
|
44
45
|
localeapp
|
46
|
+
redcarpet
|
45
47
|
rspec (~> 2.8.0)
|
data/README.md
CHANGED
@@ -28,24 +28,34 @@ You can also get a document's title (for a link title for example), like so :
|
|
28
28
|
|
29
29
|
Interpolations use `I18n`; to customise, simply overwrite any of the following keys :
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
31
|
+
```
|
32
|
+
en:
|
33
|
+
vendor:
|
34
|
+
legal_docs:
|
35
|
+
interpolations:
|
36
|
+
arbitration:
|
37
|
+
language:
|
38
|
+
location:
|
39
|
+
company:
|
40
|
+
name:
|
41
|
+
short_name:
|
42
|
+
url:
|
43
|
+
governing_law:
|
44
|
+
country:
|
45
|
+
location:
|
46
|
+
venue:
|
47
|
+
open_source_licence:
|
48
|
+
image_url:
|
49
|
+
url:
|
50
|
+
long_name:
|
51
|
+
organisation:
|
52
|
+
short_name:
|
53
|
+
service.description:
|
54
|
+
dmca_url:
|
55
|
+
free_features:
|
56
|
+
name:
|
57
|
+
paid_features:
|
58
|
+
privacy_policy_url:
|
59
|
+
support_email:
|
60
|
+
url:
|
61
|
+
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/legal-docs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{legal-docs}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Christopher Dell}]
|
12
|
-
s.date = %q{2012-04-
|
12
|
+
s.date = %q{2012-04-06}
|
13
13
|
s.description = %q{legal-docs provides a customisable privacy policy and terms of service, backed by I18n that can used in your apps.}
|
14
14
|
s.email = %q{chris@tigrish.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".rvmrc",
|
21
|
+
".travis.yml",
|
21
22
|
"Gemfile",
|
22
23
|
"Gemfile.lock",
|
23
24
|
"LICENSE.txt",
|
@@ -26,9 +27,9 @@ Gem::Specification.new do |s|
|
|
26
27
|
"VERSION",
|
27
28
|
"config/i18n.rb",
|
28
29
|
"legal-docs.gemspec",
|
29
|
-
"lib/
|
30
|
+
"lib/legal-docs.rb",
|
30
31
|
"locales/en.yml",
|
31
|
-
"spec/
|
32
|
+
"spec/legal-docs_spec.rb",
|
32
33
|
"spec/spec_helper.rb"
|
33
34
|
]
|
34
35
|
s.homepage = %q{http://github.com/tigrish/legal-docs}
|
@@ -41,12 +42,14 @@ Gem::Specification.new do |s|
|
|
41
42
|
s.specification_version = 3
|
42
43
|
|
43
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
+
s.add_runtime_dependency(%q<redcarpet>, [">= 0"])
|
44
46
|
s.add_development_dependency(%q<bundler>, ["~> 1.1.2"])
|
45
47
|
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
46
48
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
47
49
|
s.add_development_dependency(%q<i18n-spec>, [">= 0"])
|
48
50
|
s.add_development_dependency(%q<localeapp>, [">= 0"])
|
49
51
|
else
|
52
|
+
s.add_dependency(%q<redcarpet>, [">= 0"])
|
50
53
|
s.add_dependency(%q<bundler>, ["~> 1.1.2"])
|
51
54
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
52
55
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
@@ -54,6 +57,7 @@ Gem::Specification.new do |s|
|
|
54
57
|
s.add_dependency(%q<localeapp>, [">= 0"])
|
55
58
|
end
|
56
59
|
else
|
60
|
+
s.add_dependency(%q<redcarpet>, [">= 0"])
|
57
61
|
s.add_dependency(%q<bundler>, ["~> 1.1.2"])
|
58
62
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
59
63
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'redcarpet'
|
1
2
|
require File.dirname(__FILE__) + '../../config/i18n'
|
2
3
|
|
3
4
|
module LegalDocs
|
@@ -22,6 +23,10 @@ module LegalDocs
|
|
22
23
|
I18n.t i18n_scope("docs.#{@doc}.body.markdown"), interpolations
|
23
24
|
end
|
24
25
|
|
26
|
+
def html
|
27
|
+
Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(text)
|
28
|
+
end
|
29
|
+
|
25
30
|
protected
|
26
31
|
|
27
32
|
def interpolations
|
data/locales/en.yml
CHANGED
@@ -4,19 +4,18 @@ en:
|
|
4
4
|
docs:
|
5
5
|
privacy_policy:
|
6
6
|
body:
|
7
|
-
markdown: ! "
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
or correcting your personal data please email us <%{service_support_email}>\n\nIt
|
7
|
+
markdown: ! "Your privacy is critically important to us. At %{company_short_name}
|
8
|
+
we have a few fundamental principles:\n\n1. We don't ask you for personal
|
9
|
+
information unless we truly need it. (We can't stand services that ask
|
10
|
+
you for things like your gender or income level for no apparent reason.)\n2.
|
11
|
+
We don't share your personal information with anyone except to comply
|
12
|
+
with the law, develop our products, or protect our rights.\n3. We don't
|
13
|
+
store personal information on our servers unless required for the on-going
|
14
|
+
operation of one of our services.\n4. We aim to make it as simple as
|
15
|
+
possible for you to control what's visible to the public, seen by search
|
16
|
+
engines, kept private, and permanently deleted.\n\nBelow is our privacy
|
17
|
+
policy which incorporates these goals:\n\nIf you have questions about
|
18
|
+
deleting or correcting your personal data please email us <%{service_support_email}>\n\nIt
|
20
19
|
is %{company_short_name}’s policy to respect your privacy regarding
|
21
20
|
any information we may collect while operating our websites.\n\n## Website
|
22
21
|
Visitors\nLike most website operators, %{company_short_name} collects
|
@@ -118,17 +117,17 @@ en:
|
|
118
117
|
its Privacy Policy. If you have a %{service_name} account, you should
|
119
118
|
also check your project's dashboard for alerts to these changes.\n\nYour
|
120
119
|
continued use of this site after any change in this Privacy Policy will
|
121
|
-
constitute your acceptance of such change.\n\n*Thanks to [Wordpress](http://wordpress.com
|
120
|
+
constitute your acceptance of such change.\n\n*Thanks to [Wordpress](http://wordpress.com)
|
122
121
|
for releasing their Privacy Policy under a [Creative Commons Sharealike
|
123
122
|
Licence](http://creativecommons.org/licenses/by-sa/3.0/) which enabled
|
124
123
|
us to repurpose this text for our own use.*"
|
125
124
|
title: Privacy Policy
|
126
125
|
terms_of_service:
|
127
126
|
body:
|
128
|
-
markdown: ! "
|
129
|
-
|
130
|
-
|
131
|
-
|
127
|
+
markdown: ! "We (the team at [%{company_name}](%{company_url})) run a
|
128
|
+
[%{service_description}](%{service_url}) called %{service_name} and
|
129
|
+
we'd **love** you to use it.\n\n%{service_free_features} are free, and
|
130
|
+
we offer paid accounts for advanced features such %{service_paid_features}.\n\n##
|
132
131
|
Terms of Service\n\nThe following terms and conditions govern all use
|
133
132
|
of the %{service_name} website and all content, services and products
|
134
133
|
available at or through [the Website](%{service_url}).\n\nThe Website
|
@@ -389,23 +388,23 @@ en:
|
|
389
388
|
bound by, its terms and conditions; %{company_short_name} may assign
|
390
389
|
its rights under this Agreement without condition.\n \n This Agreement
|
391
390
|
will be binding upon and will inure to the benefit of the parties, their
|
392
|
-
successors and permitted assigns.\n\n*Thanks to [Wordpress](http://wordpress.com
|
391
|
+
successors and permitted assigns.\n\n*Thanks to [Wordpress](http://wordpress.com)
|
393
392
|
for releasing their Terms of Service under a [Creative Commons Sharealike
|
394
393
|
Licence](http://creativecommons.org/licenses/by-sa/3.0/) which enabled
|
395
394
|
us to repurpose this text for our own use.*"
|
396
395
|
title: Terms of Service
|
397
396
|
interpolations:
|
398
397
|
arbitration:
|
399
|
-
language:
|
400
|
-
location:
|
398
|
+
language: Arbitration Language
|
399
|
+
location: Arbitration Location
|
401
400
|
company:
|
402
|
-
name:
|
403
|
-
short_name:
|
404
|
-
url:
|
401
|
+
name: Company Name
|
402
|
+
short_name: Company Short Name
|
403
|
+
url: Company URL
|
405
404
|
governing_law:
|
406
|
-
country:
|
407
|
-
location:
|
408
|
-
venue:
|
405
|
+
country: Governing Law Country
|
406
|
+
location: Governing Law Location
|
407
|
+
venue: Governing Law Venue
|
409
408
|
open_source_licence:
|
410
409
|
image_url: http://i.creativecommons.org/l/by-sa/3.0/88x31.png
|
411
410
|
link_url: http://creativecommons.org/licenses/by-sa/3.0/
|
@@ -414,13 +413,13 @@ en:
|
|
414
413
|
short_name: CC BY-SA
|
415
414
|
url: http://creativecommons.org/licenses/by-sa/3.0/
|
416
415
|
service:
|
417
|
-
description:
|
416
|
+
description: Service Description
|
418
417
|
dmca_link_url: <Service DMCA Link URL>
|
419
|
-
free_features:
|
420
|
-
name:
|
421
|
-
paid_features:
|
422
|
-
privacy_policy_url:
|
418
|
+
free_features: Service Free Features
|
419
|
+
name: Service Name
|
420
|
+
paid_features: Service Paid Features
|
421
|
+
privacy_policy_url: Service Privacy Policy URL
|
423
422
|
support_email_address: <Service Support Email Address>
|
424
|
-
url:
|
425
|
-
dmca_url:
|
426
|
-
support_email:
|
423
|
+
url: Service URL
|
424
|
+
dmca_url: Service DMCA URL
|
425
|
+
support_email: Service Support Email
|
@@ -15,6 +15,10 @@ describe LegalDocs, "::privacy_policy" do
|
|
15
15
|
LegalDocs::privacy_policy.text.should match /Privacy Policy/
|
16
16
|
end
|
17
17
|
|
18
|
+
it "has html text" do
|
19
|
+
LegalDocs::privacy_policy.html.should match %r(<p>)
|
20
|
+
end
|
21
|
+
|
18
22
|
it "provides all necessary interpolations for the content" do
|
19
23
|
expect { LegalDocs::privacy_policy.text }.to_not raise_error(I18n::MissingInterpolationArgument)
|
20
24
|
end
|
@@ -29,6 +33,10 @@ describe LegalDocs, "::terms_of_service" do
|
|
29
33
|
LegalDocs::terms_of_service.text.should match /Terms of Service/
|
30
34
|
end
|
31
35
|
|
36
|
+
it "has html text" do
|
37
|
+
LegalDocs::terms_of_service.html.should match %r(<p>)
|
38
|
+
end
|
39
|
+
|
32
40
|
it "provides all necessary interpolations for the content" do
|
33
41
|
expect { LegalDocs::terms_of_service.text }.to_not raise_error(I18n::MissingInterpolationArgument)
|
34
42
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
3
|
require 'rspec'
|
4
|
-
require '
|
4
|
+
require 'legal-docs'
|
5
5
|
require 'i18n-spec'
|
6
6
|
|
7
7
|
# Requires supporting files with custom matchers and macros, etc,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legal-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: redcarpet
|
16
|
+
requirement: &70095025762500 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70095025762500
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: bundler
|
16
|
-
requirement: &
|
27
|
+
requirement: &70095025761760 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ~>
|
@@ -21,10 +32,10 @@ dependencies:
|
|
21
32
|
version: 1.1.2
|
22
33
|
type: :development
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *70095025761760
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rspec
|
27
|
-
requirement: &
|
38
|
+
requirement: &70095025760620 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ~>
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: 2.8.0
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70095025760620
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: jeweler
|
38
|
-
requirement: &
|
49
|
+
requirement: &70095025758720 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ~>
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: 1.8.3
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70095025758720
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: i18n-spec
|
49
|
-
requirement: &
|
60
|
+
requirement: &70095025757800 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70095025757800
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: localeapp
|
60
|
-
requirement: &
|
71
|
+
requirement: &70095025756480 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ! '>='
|
@@ -65,7 +76,7 @@ dependencies:
|
|
65
76
|
version: '0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *70095025756480
|
69
80
|
description: legal-docs provides a customisable privacy policy and terms of service,
|
70
81
|
backed by I18n that can used in your apps.
|
71
82
|
email: chris@tigrish.com
|
@@ -76,6 +87,7 @@ extra_rdoc_files:
|
|
76
87
|
- README.md
|
77
88
|
files:
|
78
89
|
- .rvmrc
|
90
|
+
- .travis.yml
|
79
91
|
- Gemfile
|
80
92
|
- Gemfile.lock
|
81
93
|
- LICENSE.txt
|
@@ -84,9 +96,9 @@ files:
|
|
84
96
|
- VERSION
|
85
97
|
- config/i18n.rb
|
86
98
|
- legal-docs.gemspec
|
87
|
-
- lib/
|
99
|
+
- lib/legal-docs.rb
|
88
100
|
- locales/en.yml
|
89
|
-
- spec/
|
101
|
+
- spec/legal-docs_spec.rb
|
90
102
|
- spec/spec_helper.rb
|
91
103
|
homepage: http://github.com/tigrish/legal-docs
|
92
104
|
licenses:
|
@@ -103,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
115
|
version: '0'
|
104
116
|
segments:
|
105
117
|
- 0
|
106
|
-
hash:
|
118
|
+
hash: -3509045034682288414
|
107
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
120
|
none: false
|
109
121
|
requirements:
|