not-quite-submodules 0.2.0 → 0.3.0

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -6,10 +6,11 @@ require 'digest/sha1'
6
6
  class NotQuiteSubmodules
7
7
  class << self
8
8
  # Update configuration repository every day
9
- UPDATE_INTERVAL = 60 * 60 * 24
9
+ DEFAULT_UPDATE_INTERVAL = 60 * 60 * 24
10
10
 
11
11
  def initialize(repository, target_path, args = {})
12
12
  args[:target_path] = target_path
13
+ @update_interval = args[:update_interval] || DEFAULT_UPDATE_INTERVAL
13
14
 
14
15
  if args[:temp_path].nil?
15
16
  tmp_name = (Digest::SHA1.hexdigest repository)
@@ -106,7 +107,7 @@ private
106
107
  # touched (by the #update_repository method)
107
108
  def repository_needs_update?(temp_path)
108
109
  return true if !ENV["FORCE_UPDATE"].nil?
109
- (Time.now - File.mtime(temp_path)) > UPDATE_INTERVAL
110
+ (Time.now - File.mtime(temp_path)) > @update_interval
110
111
  end
111
112
 
112
113
  # Pull the latest contents (including tags) for the repository
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "not-quite-submodules"
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lucas Jenss"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: not-quite-submodules
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  segments:
174
174
  - 0
175
- hash: -4333987324619040065
175
+ hash: -2096812673318803401
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements: