typingpool 0.7.4 → 0.8.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2012 Ryan Tate
1
+ Copyright (c) 2011-2013 Ryan Tate
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -448,5 +448,5 @@ Ryan Tate - ryantate@ryantate.com
448
448
 
449
449
  ##License
450
450
 
451
- Copyright (c) 2011-2012 Ryan Tate. Released under the terms of the MIT
451
+ Copyright (c) 2011-2013 Ryan Tate. Released under the terms of the MIT
452
452
  license. See LICENSE for details.
data/bin/tp-config CHANGED
@@ -60,7 +60,7 @@ unless options[:testing]
60
60
  end
61
61
 
62
62
  if not(config.amazon.bucket || (config.sftp && config.sftp.user))
63
- config.amazon.bucket = ['typingpool', SecureRandom.hex(8)].join('-')
63
+ config.amazon.bucket = Typingpool::Project::Remote::S3.random_bucket_name
64
64
  end
65
65
 
66
66
  unless config.transcripts
data/lib/typingpool.rb CHANGED
@@ -483,11 +483,11 @@
483
483
  # Ryan Tate - ryantate@ryantate.com
484
484
  #
485
485
  #==License
486
- # Copyright (c) 2011-2012 Ryan Tate. Released under the terms of the MIT
486
+ # Copyright (c) 2011-2013 Ryan Tate. Released under the terms of the MIT
487
487
  # license. See LICENSE for details.
488
488
 
489
489
  module Typingpool
490
- VERSION = '0.7.4'
490
+ require 'typingpool/version'
491
491
  require 'typingpool/error'
492
492
  require 'typingpool/utility'
493
493
  require 'typingpool/config'
@@ -39,7 +39,7 @@ module Typingpool
39
39
  #this Project instance. Takes an optional Config instance; default
40
40
  #is project.config.
41
41
  def remote(config=@config)
42
- Remote.from_config(@name, config)
42
+ Remote.from_config(config)
43
43
  end
44
44
 
45
45
  #Constructs and returns a Project::Local instance associated with
@@ -10,29 +10,27 @@ module Typingpool
10
10
  #basenames; a 'remove' method, which takes an array of remote file
11
11
  #basenames; and the methods 'host' and 'path', which return the
12
12
  #location of the destination server and destination directory,
13
- #respectively.
13
+ #respectively. The method 'url' returns the URL string pre-pended
14
+ #to each file.
14
15
  #
15
- #Thus, there will always be 'put', 'remove', 'host' and 'path'
16
+ #Thus, there will always be 'put', 'remove', 'host', 'path', and 'url'
16
17
  #methods available, in addition to the Project::Remote methods
17
18
  #outlined below.
18
19
  class Remote
19
20
  require 'typingpool/project/remote/s3'
20
21
  require 'typingpool/project/remote/sftp'
21
22
 
22
- #The project name
23
- attr_accessor :name
24
-
25
- #Constructor. Takes the project name and a Config
23
+ #Constructor. Takes a Config
26
24
  #instance. Returns a Project::Remote::S3 or
27
25
  #Project::Remote::SFTP instance, depending on the particulars of
28
26
  #the Config. If there are sufficient config params to return
29
27
  #EITHER an S3 or SFTP subclass, it will prefer the SFTP
30
28
  #subclass.
31
- def self.from_config(name, config)
29
+ def self.from_config(config)
32
30
  if config.sftp
33
- SFTP.new(name, config.sftp)
31
+ SFTP.from_config(config.sftp)
34
32
  elsif config.amazon && config.amazon.bucket
35
- S3.new(name, config.amazon)
33
+ S3.from_config(config.amazon)
36
34
  else
37
35
  raise Error, "No valid upload params found in config file (SFTP or Amazon info)"
38
36
  end
@@ -49,7 +47,7 @@ module Typingpool
49
47
  #Given a file path, returns the URL to the file path were it to
50
48
  #be uploaded by this instance.
51
49
  def file_to_url(file)
52
- "#{@url}/#{URI.escape(file)}"
50
+ "#{url}/#{URI.escape(file)}"
53
51
  end
54
52
 
55
53
  #Given an URL, returns the file portion of the path, given the
@@ -5,22 +5,36 @@ module Typingpool
5
5
  #Subclass for storing remote files on Amazon Simple Storage
6
6
  #Service (S3)
7
7
  class S3 < Remote
8
- require 'aws/s3'
9
-
10
- #An Amazon Web Services "Access Key ID." Set from the
11
- #Config#amazon value passed to Project::Remote::S3.new, but
12
- #changeable.
13
- attr_accessor :key
14
-
15
- #An Amazon Web Services "Secret Access Key." Set from the
16
- #Config#amazon value passed to Project::Remote::S3.new, but
17
- #changeable.
18
- attr_accessor :secret
8
+ require 'aws-sdk'
9
+
10
+ #Takes a Config#amazon, extracts the needed params, and
11
+ #returns a Project::Remote::S3 instance. Raises an exception
12
+ #of type Error::File::Remote::S3 if any required params (key,
13
+ #secret, bucket) are missing from the config.
14
+ def self.from_config(config_amazon)
15
+ key = config_amazon.key or raise Error::File::Remote::S3, "Missing Amazon key in config"
16
+ secret = config_amazon.secret or raise Error::File::Remote::S3, "Missing Amazon secret in config"
17
+ bucket_name = config_amazon.bucket or raise Error::File::Remote::S3, "Missing Amazon bucket in config"
18
+ url = config_amazon.url
19
+ new(key, secret, bucket_name, url)
20
+ end
19
21
 
20
- #The S3 "bucket" where uploads will be stores. Set from the
21
- #Config#amazon value passed to Project::Remote::S3.new, but
22
- #changeable.
23
- attr_accessor :bucket
22
+ #Takes an optional length for the random sequence, 16 by
23
+ #default, and an optional bucket name prefix, 'typingpool-' by
24
+ #default. Returns a string safe for use as both an S3 bucket
25
+ #and as a subdomain. Random charcters are drawn from [a-z0-9],
26
+ #though the first character in the returned string will always
27
+ #be a letter.
28
+ def self.random_bucket_name(length=16, prefix='typingpool-')
29
+ charset = [(0 .. 9).to_a, ('a' .. 'z').to_a].flatten
30
+ if prefix.to_s.empty? && (length > 0)
31
+ #ensure subdomain starts with a letter
32
+ prefix = ('a' .. 'z').to_a[SecureRandom.random_number(26)]
33
+ length -= 1
34
+ end
35
+ random_sequence = (1 .. length).map{ charset[ SecureRandom.random_number(charset.count) ] }
36
+ [prefix.to_s, random_sequence].join
37
+ end
24
38
 
25
39
  #Returns the base URL, which is prepended to the remote
26
40
  #files. This is either the 'url' attribute of the
@@ -29,16 +43,13 @@ module Typingpool
29
43
  #'default_url' (e.g. "https://bucketname.s3.amazonaws.com").
30
44
  attr_reader :url
31
45
 
32
- #Constructor. Takes the project name and the result of calling
33
- #the 'amazon' method on a Config instance (i.e. the amazon
34
- #section of a Config file).
35
- def initialize(name, amazon_config)
36
- @name = name
37
- @config = amazon_config
38
- @key = @config.key or raise Error::File::Remote::S3, "Missing Amazon key in config"
39
- @secret = @config.secret or raise Error::File::Remote::S3, "Missing Amazon secret in config"
40
- @bucket = @config.bucket or raise Error::File::Remote::S3, "Missing Amazon bucket in config"
41
- @url = @config.url || default_url
46
+ #Constructor. Takes an Amazon AWS access key id, secret access
47
+ #key, bucket name, and optional URL prefix.
48
+ def initialize(key, secret, bucket, url=nil)
49
+ @key = key
50
+ @secret = secret
51
+ @bucket_name = bucket
52
+ @url = url || default_url
42
53
  end
43
54
 
44
55
  #The remote host (server) name, parsed from #url
@@ -54,11 +65,15 @@ module Typingpool
54
65
  #Upload files/strings to S3, optionally changing the names in the process.
55
66
  # ==== Params
56
67
  #[io_streams] Enumerable collection of IO objects, like a File
57
- # or StringIO instance.
68
+ # or StringIO instance. Each IO object must repond
69
+ # to the methods rewind, read, and eof? (so no
70
+ # pipes, sockets, etc)
58
71
  #[as] Optional if the io_streams are File instances. Array of
59
72
  # file basenames, used to name the destination
60
73
  # files. Default is the basename of the Files
61
74
  # passed in as io_streams.
75
+ #[&block] Optional. Passed an io_stream and destination name
76
+ # just before each upload
62
77
  # ==== Returns
63
78
  #Array of URLs corresponding to the uploaded files.
64
79
  def put(io_streams, as=io_streams.map{|file| File.basename(file)})
@@ -66,27 +81,29 @@ module Typingpool
66
81
  dest = as[i]
67
82
  yield(stream, dest) if block_given?
68
83
  begin
69
- AWS::S3::S3Object.store(dest, stream, @bucket, :access => :public_read)
70
- rescue AWS::S3::NoSuchBucket
71
- make_bucket
84
+ s3.buckets[@bucket_name].objects[dest].write(stream, :acl => :public_read)
85
+ rescue AWS::S3::Errors::NoSuchBucket
86
+ s3.buckets.create(@bucket_name, :acl => :public_read)
87
+ stream.rewind
72
88
  retry
73
- end
89
+ end #begin
74
90
  file_to_url(dest)
75
91
  end #batch
76
92
  end
77
93
 
78
94
  #Delete objects from S3.
79
95
  # ==== Params
80
- #[files] Enumerable collection of file names. Should NOT
81
- # include the bucket name (path).
96
+ #[files] Enumerable collection of file names. Should NOT
97
+ # include the bucket name (path).
98
+ #[&block] Optional. Passed a file name before each delete.
82
99
  # ==== Returns
83
- #Array of booleans corresponding to whether the delete call
84
- #succeeded.
100
+ #Nil
85
101
  def remove(files)
86
102
  batch(files) do |file, i|
87
103
  yield(file) if block_given?
88
- AWS::S3::S3Object.delete(file, @bucket)
104
+ s3.buckets[@bucket_name].objects[file].delete
89
105
  end
106
+ nil
90
107
  end
91
108
 
92
109
  protected
@@ -94,40 +111,28 @@ module Typingpool
94
111
  def batch(io_streams)
95
112
  results = []
96
113
  io_streams.each_with_index do |stream, i|
97
- connect if i == 0
98
114
  begin
99
115
  results.push(yield(stream, i))
100
- rescue AWS::S3::S3Exception => e
101
- if e.message.match(/AWS::S3::SignatureDoesNotMatch/)
102
- raise Error::File::Remote::S3::Credentials, "S3 operation failed with a signature error. This likely means your AWS key or secret is wrong. Error: #{e}"
103
- else
104
- raise Error::File::Remote::S3, "Your S3 operation failed with an Amazon error: #{e}"
105
- end #if
116
+ rescue AWS::S3::Errors::InvalidAccessKeyId
117
+ raise Error::File::Remote::S3::Credentials, "S3 operation failed because your AWS access key ID is wrong. Double-check your config file."
118
+ rescue AWS::S3::Errors::SignatureDoesNotMatch
119
+ raise Error::File::Remote::S3::Credentials, "S3 operation failed with a signature error. This likely means your AWS secret access key is wrong."
120
+ rescue AWS::Errors::Base => e
121
+ raise Error::File::Remote::S3, "Your S3 operation failed with an Amazon error: #{e} (#{e.class})"
106
122
  end #begin
107
- end #files.each
108
- disconnect unless io_streams.empty?
123
+ end #io_streams.each_with_index
109
124
  results
110
125
  end
111
126
 
112
- def connect
113
- AWS::S3::Base.establish_connection!(
114
- :access_key_id => @key,
115
- :secret_access_key => @secret,
116
- :persistent => false,
117
- :use_ssl => true
118
- )
119
- end
120
-
121
- def disconnect
122
- AWS::S3::Base.disconnect
123
- end
124
-
125
- def make_bucket
126
- AWS::S3::Bucket.create(@bucket)
127
+ def s3
128
+ AWS::S3.new(
129
+ :access_key_id => @key,
130
+ :secret_access_key => @secret
131
+ )
127
132
  end
128
133
 
129
134
  def default_url
130
- "https://#{@bucket}.s3.amazonaws.com"
135
+ "https://#{@bucket_name}.s3.amazonaws.com"
131
136
  end
132
137
  end #S3
133
138
  end #Remote
@@ -9,6 +9,18 @@ module Typingpool
9
9
  class SFTP < Remote
10
10
  require 'net/sftp'
11
11
 
12
+ #Takes a Config#sftp, extracts the needed params, and returns
13
+ #a Project::Remote::SFTP instance. Raises an exception of type
14
+ #Error::File::Remote::SFTP if any required params (user, host,
15
+ #url) are missing from the config.
16
+ def self.from_config(config_sftp)
17
+ user = config_sftp.user or raise Error::File::Remote::SFTP, "No SFTP user specified in config"
18
+ host = config_sftp.host or raise Error::File::Remote::SFTP, "No SFTP host specified in config"
19
+ url = config_sftp.url or raise Error::File::Remote::SFTP, "No SFTP url specified in config"
20
+ path = config_sftp.path
21
+ new(user, host, url, path)
22
+ end
23
+
12
24
  #Returns the remote host (server) name. This is set from
13
25
  #Config#sftp#host.
14
26
  attr_reader :host
@@ -25,14 +37,14 @@ module Typingpool
25
37
  #files. This is set from Config#sftp#url.
26
38
  attr_reader :url
27
39
 
28
- #Constructor. Takes the project name and a Config#sftp.
29
- def initialize(name, sftp_config)
30
- @name = name
31
- @config = sftp_config
32
- @user = @config.user or raise Error::File::Remote::SFTP, "No SFTP user specified in config"
33
- @host = @config.host or raise Error::File::Remote::SFTP, "No SFTP host specified in config"
34
- @url = @config.url or raise Error::File::Remote::SFTP, "No SFTP url specified in config"
35
- @path = @config.path || ''
40
+ #Constructor. Takes the project name, SFTP user, SFTP host,
41
+ #URL prefix to append to file names, and an optional SFTP path
42
+ #(for SFTP uploading, not appended to URL).
43
+ def initialize(user, host, url, path=nil)
44
+ @user = user
45
+ @host = host
46
+ @url = url
47
+ @path = path || ''
36
48
  end
37
49
 
38
50
  #See docs for Project::Remote::S3#put.
@@ -0,0 +1,6 @@
1
+ Star Cyrillic small letter DE (0434): д
2
+
3
+ Arabic letter peheh (06A6): ڦ
4
+
5
+ A Tamil letter I (0B87): இ
6
+
@@ -0,0 +1,8 @@
1
+ ¡Héllö, wőrld!
2
+
3
+ “This text is inside ‘smart’ quotes.”
4
+
5
+ Here is a white on black cross: ✞
6
+
7
+ Here is a sideways heart: ❥
8
+
@@ -0,0 +1,3 @@
1
+ module Typingpool
2
+ VERSION = '0.8.0'
3
+ end #Typingpool
@@ -41,6 +41,7 @@ class TestTpMake < Typingpool::Test::Script
41
41
  assignments = project.local.file('data', 'assignment.csv').as(:csv)
42
42
  assert_equal(project.local.subdir('audio','chunks').to_a.size, assignments.count)
43
43
  assert_all_assets_have_upload_status(assignments, ['audio'], 'yes')
44
+ sleep 4 #pause before checking URLs so remote server has time to fully upload
44
45
  assignments.each do |assignment|
45
46
  assert_not_nil(assignment['audio_url'])
46
47
  assert(working_url? assignment['audio_url'])
@@ -108,6 +109,7 @@ class TestTpMake < Typingpool::Test::Script
108
109
  audio_urls.each_with_index do |original_url, i|
109
110
  assert_equal(original_url, audio_urls2[i])
110
111
  end
112
+ sleep 4 #pause before checking URLs so remote server has time to fully upload
111
113
  assert_equal(audio_urls.count, audio_urls2.select{|url| working_url? url }.count)
112
114
  ensure
113
115
  tp_finish_outside_sandbox(dir, good_config_path)
@@ -15,23 +15,26 @@ class TestTpFinish < Typingpool::Test::Script
15
15
  urls = csv.map{|assignment| assignment['audio_url'] }
16
16
  refute_empty(urls)
17
17
  assert_all_assets_have_upload_status(csv, ['audio'], 'yes')
18
+ sleep 3 #pause before checking URLs so remote server has time to fully upload
18
19
  assert_equal(urls.size, urls.select{|url| working_url? url}.size)
19
20
  assert_nothing_raised do
20
21
  tp_finish_outside_sandbox(dir, config_path)
21
22
  end
22
- sleep 1 #pause before checking URLs so remote server has time to fully delete
23
+ sleep 3 #pause before checking URLs so remote server has time to fully delete
23
24
  assert_empty(urls.select{|url| working_url? url })
24
25
  assert_all_assets_have_upload_status(csv, ['audio'], 'no')
25
26
  end
26
27
 
27
- def test_tp_finish_on_audio_files
28
+ def test_tp_finish_on_audio_files_with_sftp
29
+ skip_if_no_sftp_credentials('tp-finish sftp test')
28
30
  in_temp_tp_dir do |dir|
29
31
  config_path = self.config_path(dir)
30
32
  tp_finish_on_audio_files_with(dir, config_path)
31
- end
33
+ end
32
34
  end
33
35
 
34
36
  def test_tp_finish_on_audio_files_with_s3
37
+ skip_if_no_s3_credentials('tp-finish sftp test')
35
38
  in_temp_tp_dir do |dir|
36
39
  config = config_from_dir(dir)
37
40
  config.to_hash.delete('sftp')
@@ -5,37 +5,41 @@ $:.unshift File.join(File.dirname(File.dirname($0)), 'lib')
5
5
  require 'typingpool'
6
6
  require 'typingpool/test'
7
7
  require 'stringio'
8
+ require 'aws-sdk'
9
+ require 'securerandom'
8
10
 
9
11
  class TestProjectRemote < Typingpool::Test
10
12
  def test_project_remote_from_config
11
- assert(remote = Typingpool::Project::Remote.from_config(project_default[:title], dummy_config(1)))
13
+ assert(remote = Typingpool::Project::Remote.from_config(dummy_config(1)))
12
14
  assert_instance_of(Typingpool::Project::Remote::S3, remote)
13
- assert(remote = Typingpool::Project::Remote.from_config(project_default[:title], dummy_config(2)))
15
+ assert(remote = Typingpool::Project::Remote.from_config(dummy_config(2)))
14
16
  assert_instance_of(Typingpool::Project::Remote::SFTP, remote)
15
17
  config = dummy_config(2)
16
18
  config.to_hash.delete('sftp')
17
19
  assert_raises(Typingpool::Error) do
18
- Typingpool::Project::Remote.from_config(project_default[:title], config)
20
+ Typingpool::Project::Remote.from_config(config)
19
21
  end #assert_raises
20
22
  end
21
23
 
22
24
  def test_project_remote_s3_base
23
25
  config = dummy_config(1)
24
- assert(remote = Typingpool::Project::Remote::S3.new(project_default[:title], config.amazon))
25
- %w(key secret bucket).each do |param|
26
- refute_nil(remote.send(param.to_sym))
27
- assert_equal(config.amazon.send(param.to_sym), remote.send(param.to_sym))
28
- end #%w().each do...
26
+ assert(remote = Typingpool::Project::Remote::S3.from_config(config.amazon))
29
27
  assert_nil(config.amazon.url)
30
28
  assert_includes(remote.url, config.amazon.bucket)
31
29
  custom_url = 'http://tp.example.com/tp-test/1/2/3'
32
30
  config.amazon.url = custom_url
33
- assert(remote = Typingpool::Project::Remote::S3.new(project_default[:title], config.amazon))
31
+ assert(remote = Typingpool::Project::Remote::S3.from_config(config.amazon))
34
32
  refute_nil(remote.url)
35
33
  refute_includes(remote.url, config.amazon.bucket)
36
34
  assert_includes(remote.url, custom_url)
37
35
  assert_equal('tp.example.com', remote.host)
38
36
  assert_equal('/tp-test/1/2/3', remote.path)
37
+ assert_includes(Typingpool::Project::Remote::S3.random_bucket_name, 'typingpool-')
38
+ assert_equal(27, Typingpool::Project::Remote::S3.random_bucket_name.size)
39
+ assert_equal(21,Typingpool::Project::Remote::S3.random_bucket_name(10).size)
40
+ assert_equal(28,Typingpool::Project::Remote::S3.random_bucket_name(10, 'testing-typingpool').size)
41
+ assert_equal(34,Typingpool::Project::Remote::S3.random_bucket_name(16, 'testing-typingpool').size)
42
+ assert_match(Typingpool::Project::Remote::S3.random_bucket_name(16, ''), /^[a-z]/)
39
43
  end
40
44
 
41
45
  def test_project_remote_s3_networked
@@ -47,9 +51,26 @@ class TestProjectRemote < Typingpool::Test
47
51
  standard_put_remove_tests(remote)
48
52
  end
49
53
 
54
+ def test_project_remote_s3_networked_make_new_bucket_when_needed
55
+ assert(config = self.config)
56
+ skip_if_no_s3_credentials('Project::Remote::S3 upload and delete tests', config)
57
+ config.to_hash.delete('sftp')
58
+ config.amazon.bucket = Typingpool::Project::Remote::S3.random_bucket_name(16, 'typingpool-test-')
59
+ assert(s3 = AWS::S3.new(:access_key_id => config.amazon.key, :secret_access_key => config.amazon.secret))
60
+ refute(s3.buckets[config.amazon.bucket].exists?)
61
+ assert(project = Typingpool::Project.new(project_default[:title], config))
62
+ assert_instance_of(Typingpool::Project::Remote::S3, remote = project.remote)
63
+ begin
64
+ standard_put_remove_tests(remote)
65
+ assert(s3.buckets[config.amazon.bucket].exists?)
66
+ ensure
67
+ s3.buckets[config.amazon.bucket].delete
68
+ end #begin
69
+ end
70
+
50
71
  def test_project_remote_sftp_base
51
72
  config = dummy_config(2)
52
- assert(remote = Typingpool::Project::Remote::SFTP.new(project_default[:title], config.sftp))
73
+ assert(remote = Typingpool::Project::Remote::SFTP.from_config(config.sftp))
53
74
  %w(host path user url).each do |param|
54
75
  refute_nil(remote.send(param.to_sym))
55
76
  assert_equal(config.sftp.send(param.to_sym), remote.send(param.to_sym))
@@ -140,6 +161,7 @@ class TestProjectRemote < Typingpool::Test
140
161
  assert(urls = args[:remote].put(*put_args))
141
162
  begin
142
163
  assert_equal(args[:streams].count, urls.count)
164
+ sleep 4
143
165
  urls.each{|url| assert(working_url?(url)) }
144
166
  args[:test_with].call(urls) if args[:test_with]
145
167
  ensure
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env gem build
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
+ require 'typingpool/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'typingpool'
8
+ s.version = Typingpool::VERSION
9
+ s.date = Time.now.strftime("%Y-%m-%d")
10
+ s.description = 'An app for transcribing audio using Mechanical Turk'
11
+ s.summary = s.description
12
+ s.authors = ['Ryan Tate']
13
+ s.email = 'ryantate@ryantate.com'
14
+ s.homepage = 'http://github.com/ryantate/typingpool'
15
+ s.required_ruby_version = '>= 1.9.2'
16
+ s.requirements = ['ffmpeg', 'mp3splt', 'mp3wrap']
17
+ s.add_runtime_dependency('rturk', '~> 2.9')
18
+ s.add_runtime_dependency('highline', '>= 1.6')
19
+ s.add_runtime_dependency('nokogiri', '>= 1.5')
20
+ s.add_runtime_dependency('aws-sdk', '~> 1.8.0')
21
+ s.add_runtime_dependency('net-sftp', '>= 2.0.5')
22
+ s.add_runtime_dependency('vcr')
23
+ s.add_runtime_dependency('webmock')
24
+ s.require_path = 'lib'
25
+ s.executables = ['tp-config',
26
+ 'tp-make',
27
+ 'tp-assign',
28
+ 'tp-review',
29
+ 'tp-collect',
30
+ 'tp-finish']
31
+ s.test_files = ['test/test_unit_amazon.rb',
32
+ 'test/test_unit_config.rb',
33
+ 'test/test_unit_filer.rb',
34
+ 'test/test_unit_project.rb',
35
+ 'test/test_unit_project_local.rb',
36
+ 'test/test_unit_project_remote.rb',
37
+ 'test/test_unit_template.rb',
38
+ 'test/test_unit_transcript.rb']
39
+ s.bindir = 'bin'
40
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
41
+ s.files = `git ls-files`.split("\n")
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typingpool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-13 00:00:00.000000000 Z
12
+ date: 2013-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rturk
@@ -60,13 +60,13 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.5'
62
62
  - !ruby/object:Gem::Dependency
63
- name: aws-s3
63
+ name: aws-sdk
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '0.6'
69
+ version: 1.8.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: '0.6'
77
+ version: 1.8.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: net-sftp
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -126,32 +126,32 @@ dependencies:
126
126
  description: An app for transcribing audio using Mechanical Turk
127
127
  email: ryantate@ryantate.com
128
128
  executables:
129
- - tp-config
130
- - tp-make
131
129
  - tp-assign
132
- - tp-review
133
130
  - tp-collect
131
+ - tp-config
134
132
  - tp-finish
133
+ - tp-make
134
+ - tp-review
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
- - Rakefile
139
138
  - LICENSE
140
139
  - README.markdown
141
- - bin/tp-config
142
- - bin/tp-make
140
+ - Rakefile
143
141
  - bin/tp-assign
144
- - bin/tp-review
145
142
  - bin/tp-collect
143
+ - bin/tp-config
146
144
  - bin/tp-finish
145
+ - bin/tp-make
146
+ - bin/tp-review
147
147
  - lib/typingpool.rb
148
148
  - lib/typingpool/amazon.rb
149
- - lib/typingpool/amazon/question.rb
150
149
  - lib/typingpool/amazon/hit.rb
151
- - lib/typingpool/amazon/hit/full.rb
152
- - lib/typingpool/amazon/hit/full/fromsearchhits.rb
153
150
  - lib/typingpool/amazon/hit/assignment.rb
154
151
  - lib/typingpool/amazon/hit/assignment/empty.rb
152
+ - lib/typingpool/amazon/hit/full.rb
153
+ - lib/typingpool/amazon/hit/full/fromsearchhits.rb
154
+ - lib/typingpool/amazon/question.rb
155
155
  - lib/typingpool/app.rb
156
156
  - lib/typingpool/app/cli.rb
157
157
  - lib/typingpool/app/cli/formatter.rb
@@ -173,12 +173,6 @@ files:
173
173
  - lib/typingpool/template.rb
174
174
  - lib/typingpool/template/assignment.rb
175
175
  - lib/typingpool/template/env.rb
176
- - lib/typingpool/test.rb
177
- - lib/typingpool/test/script.rb
178
- - lib/typingpool/transcript.rb
179
- - lib/typingpool/transcript/chunk.rb
180
- - lib/typingpool/utility.rb
181
- - lib/typingpool/utility/castable.rb
182
176
  - lib/typingpool/templates/assignment/amazon-init.js
183
177
  - lib/typingpool/templates/assignment/interview.html.erb
184
178
  - lib/typingpool/templates/assignment/interview/nameless.html.erb
@@ -205,6 +199,7 @@ files:
205
199
  - lib/typingpool/templates/project/etc/player/player.swf
206
200
  - lib/typingpool/templates/project/etc/transcript.css
207
201
  - lib/typingpool/templates/transcript.html.erb
202
+ - lib/typingpool/test.rb
208
203
  - lib/typingpool/test/fixtures/amazon-question-html.html
209
204
  - lib/typingpool/test/fixtures/amazon-question-url.txt
210
205
  - lib/typingpool/test/fixtures/audio/mp3/interview.1.mp3
@@ -222,12 +217,20 @@ files:
222
217
  - lib/typingpool/test/fixtures/tp_review_id.txt
223
218
  - lib/typingpool/test/fixtures/tp_review_sandbox-assignment.csv
224
219
  - lib/typingpool/test/fixtures/transcript-chunks.csv
220
+ - lib/typingpool/test/fixtures/utf8-2.txt
221
+ - lib/typingpool/test/fixtures/utf8.txt
225
222
  - lib/typingpool/test/fixtures/utf8_transcript.txt
226
223
  - lib/typingpool/test/fixtures/vcr/tp-collect-1.yml
227
224
  - lib/typingpool/test/fixtures/vcr/tp-collect-2.yml
228
225
  - lib/typingpool/test/fixtures/vcr/tp-collect-3.yml
229
226
  - lib/typingpool/test/fixtures/vcr/tp-review-1.yml
230
227
  - lib/typingpool/test/fixtures/vcr/tp-review-2.yml
228
+ - lib/typingpool/test/script.rb
229
+ - lib/typingpool/transcript.rb
230
+ - lib/typingpool/transcript/chunk.rb
231
+ - lib/typingpool/utility.rb
232
+ - lib/typingpool/utility/castable.rb
233
+ - lib/typingpool/version.rb
231
234
  - test/make_amazon_question_fixture.rb
232
235
  - test/make_tp_collect_fixture_1.rb
233
236
  - test/make_tp_collect_fixture_2.rb
@@ -250,6 +253,7 @@ files:
250
253
  - test/test_unit_project_remote.rb
251
254
  - test/test_unit_template.rb
252
255
  - test/test_unit_transcript.rb
256
+ - typingpool.gemspec
253
257
  homepage: http://github.com/ryantate/typingpool
254
258
  licenses: []
255
259
  post_install_message: