atig 0.3.9 → 0.3.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bd1deb353dc988907e5ccfd8cf406af32d87e57
4
- data.tar.gz: 59c62f4f5dd589ceb5b34a1241a0f87f263af062
3
+ metadata.gz: 71907c93de1c5c0cb6d4deb6b36306f70831cdee
4
+ data.tar.gz: 7cf8504d9388e20fa2d42881c464f81bdd20b1a1
5
5
  SHA512:
6
- metadata.gz: 2e55a6c3e9c0aa14a705d516a712c66bea030a4872d84d5e3e57be3dca45fc3070933c92c632c30cd8b8aa9567c5e35aecba9cd329d5fe7cbd1d530d445c493f
7
- data.tar.gz: 480828e5f8ec3181212cf5bc6b237aaca066b93707d43275aff6f91a22007357268586220248b0086813fdec7c5bc77bcbaaea763f443c11bd979e1d8c4075cc
6
+ metadata.gz: eba90618e20d880aa8d48602b5e5ca2e2f0a0a112f368c27ccd8b50816aed85d46573f1d2c698e6f5709813d7a3fb88ccaf2a5f9c29e564b955452e1d64b7b95
7
+ data.tar.gz: 3c3998b3f0581f0602f9e09c61c23f0958d620146afd155a36148f9d07e6f6e2b90d02771caa96b2b37bcf75ac71b9fb21a1a9b62bfa779b5b6c127bbdb9d8c5
data/lib/atig/db/db.rb CHANGED
@@ -7,7 +7,6 @@ require 'atig/util'
7
7
  require 'thread'
8
8
  require 'set'
9
9
  require 'fileutils'
10
- require 'tmpdir'
11
10
 
12
11
  module Atig
13
12
  module Db
@@ -15,12 +14,12 @@ module Atig
15
14
  include Util
16
15
  attr_reader :followings, :statuses, :dms, :lists, :noretweets
17
16
  attr_accessor :me
18
- Path = ::Dir.tmpdir
19
17
  VERSION = 4
20
18
 
21
19
  def initialize(context, opt={})
22
20
  @log = context.log
23
21
  @me = opt[:me]
22
+ @tmpdir = opt[:tmpdir]
24
23
 
25
24
  @followings = Followings.new dir('following')
26
25
  @statuses = Statuses.new dir('status')
@@ -31,8 +30,8 @@ module Atig
31
30
  log :info, "initialize"
32
31
  end
33
32
 
34
- def dir(id)
35
- dir = File.expand_path "atig/#{@me.screen_name}/", Path
33
+ def dir(id, tmpdir)
34
+ dir = File.expand_path "atig/#{@me.screen_name}/", @tmpdir
36
35
  log :debug, "db(#{id}) = #{dir}"
37
36
  FileUtils.mkdir_p dir
38
37
  File.expand_path "#{id}.#{VERSION}.db", dir
data/lib/atig/optparse.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "optparse"
2
+ require 'tmpdir'
2
3
 
3
4
  module Atig
4
5
  module OptParser
@@ -10,6 +11,7 @@ module Atig
10
11
  :log => nil,
11
12
  :debug => false,
12
13
  :foreground => false,
14
+ :tmpdir => ::Dir.tmpdir,
13
15
  :conf => '~/.atig/config',
14
16
  }
15
17
 
@@ -38,6 +40,10 @@ EOB
38
40
  opts[:debug] = true
39
41
  end
40
42
 
43
+ on("--tmpdir", "temporary directory path") do |tmp|
44
+ opts[:tmpdir] = tmp
45
+ end
46
+
41
47
  on("--memprof", "Enable memory profiler") do|_|
42
48
  require 'memory_profiler'
43
49
  require 'fileutils'
data/lib/atig/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Atig
2
- VERSION = "0.3.9"
2
+ VERSION = "0.3.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-03 00:00:00.000000000 Z
11
+ date: 2013-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  version: '0'
306
306
  requirements: []
307
307
  rubyforge_project:
308
- rubygems_version: 2.0.0
308
+ rubygems_version: 2.0.3
309
309
  signing_key:
310
310
  specification_version: 4
311
311
  summary: Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.
@@ -353,3 +353,4 @@ test_files:
353
353
  - spec/sized_hash_spec.rb
354
354
  - spec/spec_helper.rb
355
355
  - spec/update_checker_spec.rb
356
+ has_rdoc: