mcmire-shoulda-matchers 2.6.1.docs.1 → 2.6.2.docs.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +21 -18
- data/doc_config/gh-pages/index.html.erb +1 -1
- data/lib/shoulda/matchers/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1407afc17c1ba5bc2106ad7de5350d831433f2
|
4
|
+
data.tar.gz: 991108f5b4e61238c4b73bada789d40c313c5662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 114068cefadda21f30b57bea8609ac6c2d5f3f71866d376c856fb26b2f463d02aed6317d95ffd797f1006c159b4868c1167f0f356b2bc7c7a713bb4c7c61660f
|
7
|
+
data.tar.gz: ea5f8e23f8811c5af753c155f685a67cf562f557c1abe93af4e6224580cbe70065a5dc6f45a5eb854876ec917ff3279d25d616003686fa4fc2bf63a6bd65d405
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -47,22 +47,26 @@ namespace :docs do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
desc 'Generate docs for a particular version'
|
50
|
-
task :generate, [:version, :
|
51
|
-
|
52
|
-
generate_docs(args.version, latest: latest)
|
50
|
+
task :generate, [:version, :latest_version] => :setup do |t, args|
|
51
|
+
generate_docs(args.version, latest_version: latest_version)
|
53
52
|
end
|
54
53
|
|
55
54
|
desc 'Generate docs for a particular version and push them to GitHub'
|
56
|
-
task :publish, [:version, :
|
57
|
-
|
58
|
-
|
59
|
-
publish_docs(args.version, latest: latest)
|
55
|
+
task :publish, [:version, :latest_version] => :setup do |t, args|
|
56
|
+
generate_docs(args.version, latest_version: latest_version)
|
57
|
+
publish_docs(args.version, latest_version: latest_version)
|
60
58
|
end
|
61
59
|
|
62
60
|
desc "Generate docs for version #{CURRENT_VERSION} and push them to GitHub"
|
63
61
|
task :publish_latest => :setup do
|
64
|
-
|
65
|
-
|
62
|
+
version = Gem::Version.new(CURRENT_VERSION)
|
63
|
+
|
64
|
+
unless version.prerelease?
|
65
|
+
latest_version = version.to_s
|
66
|
+
end
|
67
|
+
|
68
|
+
generate_docs(CURRENT_VERSION, latest_version: latest_version)
|
69
|
+
publish_docs(CURRENT_VERSION, latest_version: latest_version)
|
66
70
|
end
|
67
71
|
|
68
72
|
def rewrite_index_to_inject_version(ref, version)
|
@@ -86,13 +90,13 @@ namespace :docs do
|
|
86
90
|
sh "git add #{ref}"
|
87
91
|
end
|
88
92
|
|
89
|
-
if options[:
|
90
|
-
generate_file_that_redirects_to_latest_version(
|
93
|
+
if options[:latest_version]
|
94
|
+
generate_file_that_redirects_to_latest_version(options[:latest_version])
|
91
95
|
end
|
92
96
|
end
|
93
97
|
|
94
98
|
def publish_docs(version, options = {})
|
95
|
-
message = build_commit_message(version
|
99
|
+
message = build_commit_message(version)
|
96
100
|
|
97
101
|
within_gh_pages do
|
98
102
|
sh 'git clean -f'
|
@@ -102,6 +106,9 @@ namespace :docs do
|
|
102
106
|
end
|
103
107
|
|
104
108
|
def generate_file_that_redirects_to_latest_version(version)
|
109
|
+
ref = determine_ref_from(version)
|
110
|
+
locals = { ref: ref }
|
111
|
+
|
105
112
|
erb = ERB.new(File.read('doc_config/gh-pages/index.html.erb'))
|
106
113
|
|
107
114
|
within_gh_pages do
|
@@ -118,12 +125,8 @@ namespace :docs do
|
|
118
125
|
end
|
119
126
|
end
|
120
127
|
|
121
|
-
def build_commit_message(version
|
122
|
-
|
123
|
-
"Regenerated docs for latest version #{version}"
|
124
|
-
else
|
125
|
-
"Regenerated docs for version #{version}"
|
126
|
-
end
|
128
|
+
def build_commit_message(version)
|
129
|
+
"Regenerated docs for version #{version}"
|
127
130
|
end
|
128
131
|
|
129
132
|
def within_gh_pages(&block)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>shoulda-matchers Documentation - latest</title>
|
5
|
-
<meta http-equiv="refresh" content="0;URL=http://mcmire.github.io/shoulda-matchers/<%=
|
5
|
+
<meta http-equiv="refresh" content="0;URL=http://mcmire.github.io/shoulda-matchers/<%= locals[:ref] %>">
|
6
6
|
</head>
|
7
7
|
<body>
|
8
8
|
</body>
|