gitarro 0.1.5 → 0.1.52
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.
- checksums.yaml +4 -4
- data/lib/gitarro/backend.rb +5 -9
- data/lib/gitarro/opt_parser.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9394fd417107857cfbf9e58db40b1478605986aa
|
|
4
|
+
data.tar.gz: d939f4b1b3210fa0693a1fc7b5365cbb710b0f60
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62e98475342aee2a999c3d7b1b831f56f6bcbc947897f23740e6b6c8e4c7325335372fa4d13a9c9e05b0ade36c7bb208e8d7eddf0af97ff929e9c060745ccc39
|
|
7
|
+
data.tar.gz: 9a395dd70ecc830c6febfdbae0f65baf4e2d68714315d380d3cdeaa929830119dc9edd87d01c3b078e1c4f61b462678a3685bff00c5f74197ae4e8040059ade3
|
data/lib/gitarro/backend.rb
CHANGED
|
@@ -79,13 +79,13 @@ end
|
|
|
79
79
|
module CachingOctokit
|
|
80
80
|
def create_dir_store(cache_path)
|
|
81
81
|
cache_name = 'httpcache'
|
|
82
|
-
full_cache_dir = "#{cache_path}
|
|
82
|
+
full_cache_dir = "#{cache_path}/#{cache_name}"
|
|
83
83
|
ActiveSupport::Cache::FileStore.new(full_cache_dir)
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def generate_cache(httpcache_path)
|
|
87
87
|
# changed_since cannot work with cache
|
|
88
|
-
return false
|
|
88
|
+
return false unless generate_cache?
|
|
89
89
|
stack = Faraday::RackBuilder.new do |builder|
|
|
90
90
|
builder.use Faraday::HttpCache,
|
|
91
91
|
store: create_dir_store(httpcache_path),
|
|
@@ -97,13 +97,9 @@ module CachingOctokit
|
|
|
97
97
|
Octokit.middleware = stack
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
#
|
|
101
|
-
def
|
|
102
|
-
|
|
103
|
-
puts '###############################'
|
|
104
|
-
puts 'NO HTTP Faraday Cache generated!'
|
|
105
|
-
puts '###############################'
|
|
106
|
-
true
|
|
100
|
+
# by default is false, enable only via option
|
|
101
|
+
def generate_cache?
|
|
102
|
+
@cachehttp
|
|
107
103
|
end
|
|
108
104
|
end
|
|
109
105
|
|
data/lib/gitarro/opt_parser.rb
CHANGED
|
@@ -182,6 +182,7 @@ class OptParserInternal
|
|
|
182
182
|
@options[:target_url] = '' if @options[:target_url].nil?
|
|
183
183
|
@options[:https] = false if @options[:https].nil?
|
|
184
184
|
@options[:changed_since] = -1 if @options[:changed_since].nil?
|
|
185
|
+
@options[:cachehttp] = false if @options[:cachehttp].nil?
|
|
185
186
|
end
|
|
186
187
|
|
|
187
188
|
def defaults_to_text
|
|
@@ -189,7 +190,6 @@ class OptParserInternal
|
|
|
189
190
|
@options[:file_type] = '.changes' if @options[:changelog_test]
|
|
190
191
|
@options[:description] = desc if @options[:description].nil?
|
|
191
192
|
@options[:file_type] = 'notype' if @options[:file_type].nil?
|
|
192
|
-
@options[:cachehttp] = '/tmp/gitarro' if @options[:cachehttp].nil?
|
|
193
193
|
end
|
|
194
194
|
end
|
|
195
195
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitarro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.52
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dario Maiocchi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: english
|