flumtter 5.6.1 → 5.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dc11e675be866e697598135fe48e5d03d6b85d7
4
- data.tar.gz: e2b088696ad5a4e7badfd3fa89c1654aca12c303
3
+ metadata.gz: 2efd77a7cd78ad3a4c95efead3ad3f034bf7869a
4
+ data.tar.gz: 01e9bd0d32ac39f742722ed21010e896d8d85cb0
5
5
  SHA512:
6
- metadata.gz: b558afaf60b576c68bde75a4e4521cb85d208b8f6fb61831600a171a0e8e26a65f811f8947b8b3ba6a9ad9e60cf77c3d9471f4928f2b164aa86580793079cdb8
7
- data.tar.gz: 1c951c6885c2a8dd0e64e36d334c74eb4d8929a8e9a4776bf6ad03ef527ffa08372bd84392dd56911a31d6cb128dea8e957ef29b24dad7866ae0f4fecb614c5b
6
+ metadata.gz: 9334019798f5de8598c81e0b92406f1f7f441dd38a2386407f6178fe857166708d547da5f297cdbdb75b80641edfb04a3de0cedde9e03bf4f33682094d174320
7
+ data.tar.gz: ca3d5fbb5ffcc39aa5a3faae8e5b1205b7cdf7132103488fcee4e263e226b1aa7912ce892d4dd6a44ccc91300501151f312130ebc5325259b7b238c804e063ed
data/README.md CHANGED
@@ -12,10 +12,12 @@ If you use tmux mode, you have to install `tmux`.
12
12
  $ gem install flumtter
13
13
 
14
14
  - On Ubuntu
15
- $ apt install ruby ruby-dev build-essential libncurses5-dev tmux
15
+
16
+ $ apt install ruby ruby-dev build-essential libncurses5-dev tmux
16
17
 
17
18
  - On MacOSX
18
- $ brew install ruby tmux
19
+
20
+ $ brew install ruby tmux
19
21
 
20
22
  ## Usage
21
23
  $ flumtter
@@ -33,6 +33,8 @@ module Flumtter
33
33
  @@account_list[options[:id]]
34
34
  elsif options[:name]
35
35
  @@account_list.select{|a|a.screen_name == options[:name]}.first
36
+ elsif options[:names]
37
+ @@account_list.select{|a|options[:names].include?(a.screen_name)}.first
36
38
  elsif @@account_list.empty?
37
39
  regist
38
40
  @@account_list.first
@@ -28,6 +28,13 @@ module Flumtter
28
28
  exit
29
29
  end
30
30
  end
31
+
32
+ def multiuser(twitter)
33
+ Setting[:names].each do |name|
34
+ twitter.set AccountSelector.select(name: name)
35
+ yield
36
+ end
37
+ end
31
38
  end
32
39
  end
33
40
  end
@@ -28,6 +28,7 @@ module Flumtter
28
28
  start
29
29
  Keyboard.input(self)
30
30
  rescue NoSetAccount
31
+ STDERR.puts "Error: Account Not Found".color
31
32
  exit
32
33
  end
33
34
 
@@ -1,16 +1,20 @@
1
1
  module Flumtter
2
2
  plugin do
3
3
  Cli.add("--tweet VALUES", "new tweet") do |twitter, args|
4
- twitter.rest.update(args)
4
+ Cli.multiuser(twitter) do
5
+ twitter.rest.update(args)
6
+ end
5
7
  end
6
8
  Cli.add("--tweet_with_image=V,V", Array, "new tweet with image") do |twitter, (tweet, file)|
7
- begin
8
- twitter.rest.update_with_media(tweet, open(file))
9
- rescue Twitter::Error::Forbidden => e
10
- if e.message == "Error creating status."
11
- STDERR.puts "This file is not supported."
12
- else
13
- raise e
9
+ Cli.multiuser(twitter) do
10
+ begin
11
+ twitter.rest.update_with_media(tweet, open(file))
12
+ rescue Twitter::Error::Forbidden => e
13
+ if e.message == "Error creating status."
14
+ STDERR.puts "This file is not supported.".color
15
+ else
16
+ raise e
17
+ end
14
18
  end
15
19
  end
16
20
  end
@@ -1,3 +1,3 @@
1
1
  module Flumtter
2
- VERSION = "5.6.1"
2
+ VERSION = "5.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flumtter
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - flum1025
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-21 00:00:00.000000000 Z
11
+ date: 2017-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler