mtm 3.0.0 → 3.0.1

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.
Files changed (4) hide show
  1. checksums.yaml +6 -14
  2. data/lib/mtm/mtm.rb +23 -10
  3. data/lib/mtm/version.rb +1 -1
  4. metadata +11 -12
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZGFlZDcwMTZiOTNmMGU4MjYyMTI2MjQyYTNjOGQ4MTNjZGY4N2YxYg==
5
- data.tar.gz: !binary |-
6
- MDY1OTM2YTUxYTE3YTU1MWJlZjUwNjU4YzFjZWZiNWQxNDFkYTAxMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NWIxYmVjMGIyZDE2NmE5Y2M4Mzg1YzE5ZmEwYzhhMDI4YTZlZTkwNjE4ZTU2
10
- NTQ2M2E2NGRhYzAxMDhjY2FmZTZlMDVhYjY3MmQ5OTM5MmMyOTg3YTRmYjU4
11
- N2E4M2U3ZmZlNmU0YTMwOTljMmUwMTkyZWYwMDUwODg3ZTMwNGY=
12
- data.tar.gz: !binary |-
13
- MDYxOWJiYzE2MmNmZWRmNGJiM2MzZjhhZWNhOGRjMGM1OWU3MDBhMjA2OWRm
14
- MTVkNTRiMjEzMTNkOGI0Zjc0Y2JhZmFiODQyOTJkZjBjYWFlZDU2NTVhODVm
15
- NTcyOGQ1NmQ5ZjEyMGZlYWQzZGYyMjhhNWEyMThhMjJiMmY0MTg=
2
+ SHA1:
3
+ metadata.gz: 8858a58f5f8d6dfa93375048137e0529468031cc
4
+ data.tar.gz: d228ff437a0ab5d8414dbccbf6e1a206cb94a31b
5
+ SHA512:
6
+ metadata.gz: 91654f8521dada92cbd34e742c20b3b3188ea665ffe677204511844eba77b95f3ad6bdf71b2624b9a46506028d91d43e16998443ed9456a0bba075aa03a1efd8
7
+ data.tar.gz: 8dfa76225cc5506da41f9275b02b2314959a7703568d7e9c2f711c74a9951e38595b31323d6d5c05d70512c6645c7882d6a6fb4bf688483ed0a4a88d6baecaab
@@ -1,11 +1,7 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__)) unless $LOAD_PATH.include?(File.dirname(__FILE__))
2
- require 'rubygems'
3
- require 'sfdc' # gem install sfdc
4
- require 'optparse/date'
5
- require 'ruby-progressbar'
6
- require 'utils'
7
- require 'config'
8
- require 'version'
2
+ %w(sfdc optparse/date ruby-progressbar utils config version).each do |file|
3
+ require "#{file}"
4
+ end
9
5
 
10
6
  # Parse arguments
11
7
  options = {}
@@ -22,6 +18,7 @@ options[:tm_c_number] = SF_CHANGE_NUMBER
22
18
  options[:tm_hour] = SF_HOUR
23
19
  options[:tm_date] = DateTime.now.to_date
24
20
  options[:tm_description] = SF_TIMECARD_DESCRIPTION
21
+ options[:feeds] = false
25
22
 
26
23
  # salesforce remote app client id
27
24
  sf_client_id = '3MVG9Y6d_Btp4xp6SWO6yPlUURnycVbOfuH7I_NH2bjaw0yeoguRatNzKRpEVaIvmX7TcQbVVjuQUCZ006pwN'
@@ -32,7 +29,7 @@ op = OptionParser.new do |opts|
32
29
  opts.banner = <<-BANNER
33
30
  Timecard Solution
34
31
  Usage: run 'gem environment' in your console and find the 'GEM PATHS'
35
- go to 'GEM PATHS/gems/mtm-2.2.0/lib/mtm'
32
+ go to 'GEM PATHS/gems/mtm-3.0.0/lib/mtm'
36
33
  open config.rb and input your Salesforce user name and password(token).
37
34
  mtm -p project -c change -t 6 -e 'Added exception process logic.'
38
35
  BANNER
@@ -89,6 +86,10 @@ op = OptionParser.new do |opts|
89
86
  options[:tm_description] = desc
90
87
  end
91
88
 
89
+ opts.on("-f", "List your Chatter feeds") do |f|
90
+ options[:feeds] = f
91
+ end
92
+
92
93
  opts.on_tail("-h", "--help", "Show help message") do
93
94
  puts op
94
95
  exit
@@ -111,7 +112,7 @@ if ARGV.size < 1
111
112
  exit
112
113
  end
113
114
 
114
- @pb = ProgressBar.create(:title => 'Logging', :starting_at => 0, :total => 100, :progress_mark => '*', :format => '%w %%')
115
+ @pb = ProgressBar.create(title: 'Logging', starting_at: 0, total: 100, progress_mark: '*', format: '%w %%')
115
116
  40.times { sleep(0.05); @pb.increment }
116
117
 
117
118
  # login to salesforce.com
@@ -131,6 +132,18 @@ rescue Exception => e
131
132
  abort 'Failed to connect to Salesforce.'
132
133
  end
133
134
 
135
+ # List your Chatter feeds
136
+ if options[:feeds]
137
+ puts
138
+ client.feeds.each do |f|
139
+ puts f.to_hash['actor']['name'] << ': '
140
+ puts ' '<< f.to_hash['body']['text']
141
+ puts
142
+ end
143
+ @pb.finish
144
+ abort
145
+ end
146
+
134
147
  # list all projects and its changes
135
148
  if options[:tm_list]
136
149
  40.times { sleep(0.05); @pb.increment }
@@ -246,4 +259,4 @@ if is_success
246
259
  end
247
260
  end
248
261
 
249
- @pb.finish
262
+ @pb.finish
@@ -1,3 +1,3 @@
1
1
  module Mtm
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mtm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Yue
@@ -9,48 +9,48 @@ autorequire:
9
9
  bindir:
10
10
  - bin
11
11
  cert_chain: []
12
- date: 2013-04-10 00:00:00.000000000 Z
12
+ date: 2013-04-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sfdc
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 2.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 2.0.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: ruby-progressbar
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: 1.0.2
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ! '>='
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.0.2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: twilio-ruby
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: 3.9.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: 3.9.0
56
56
  description: Timecard solution
@@ -77,19 +77,18 @@ require_paths:
77
77
  - lib
78
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.0.3
90
+ rubygems_version: 2.0.0
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Timecard
94
94
  test_files: []
95
- has_rdoc: