lolcommits-term_output 0.0.4 → 0.0.5

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
- SHA1:
3
- metadata.gz: 71a273300c0caf7ea63d720d6ead07c8f64a2d07
4
- data.tar.gz: efae4dba684cbb3c90792e2ea9ebf3287e10b4cb
2
+ SHA256:
3
+ metadata.gz: 13464b6e3300cea72582feca629f9d3ef4c2562b63590c4fddd1a0bec1649671
4
+ data.tar.gz: 9b456724442022af6fa648303ea111903d0609600b3bc4f256207c98bdf0d03f
5
5
  SHA512:
6
- metadata.gz: 9edf362c433af39884e418609282847e30a8d3ac2d7f855d1518955aa9185f02b1297316818e133c517135d19eac4d3681af0b88dd964b7a520606fd50c4b8cd
7
- data.tar.gz: 61f14d9b655e86d5423802890c5d6517d22e560c7daa68ae5e71dde32a3148271b88dee68495e94d9a1605e44d1255683962d4a45f446c6c4d6808f9fe8310b1
6
+ metadata.gz: e6b025007105fd12848c92b16758b4312711568ad95686781e78cd3599a4ef34322354f82b942eaf1378e092478b56c0faa60ea7d7fbe4f8caf1f4ca7488302d
7
+ data.tar.gz: 17acdb03a1cefa888b765896db53d400d3a1a7b3307ec0957b770e41f81649db16f65b3c7f2c653ab314f062c9463e4254ffd5588f680940affa5d5500496783
@@ -2,18 +2,19 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.0.0
6
- - 2.1.10
7
- - 2.2.8
8
- - 2.3.5
9
- - 2.4.2
10
- - ruby-head
5
+ - 2.0.0
6
+ - 2.1.10
7
+ - 2.2.9
8
+ - 2.3.6
9
+ - 2.4.3
10
+ - 2.5.0
11
+ - ruby-head
11
12
 
12
13
  before_install:
13
- - gem install bundler -v 1.13.7
14
- - git --version
15
- - git config --global user.email "lol@commits.org"
16
- - git config --global user.name "Lolcommits"
14
+ - gem update --system
15
+ - git --version
16
+ - git config --global user.email "lol@commits.org"
17
+ - git config --global user.name "Lolcommits"
17
18
 
18
19
  matrix:
19
20
  allow_failures:
@@ -5,15 +5,6 @@ module Lolcommits
5
5
  module Plugin
6
6
  class TermOutput < Base
7
7
 
8
- ##
9
- # Returns the name of the plugin to identify it to lolcommits.
10
- #
11
- # @return [String] the plugin name
12
- #
13
- def self.name
14
- 'term_output'
15
- end
16
-
17
8
  ##
18
9
  # Returns position(s) of when this plugin should run during the capture
19
10
  # process. The image is presented to the terminal when the capture is
@@ -35,7 +26,7 @@ module Lolcommits
35
26
  if terminal_supported?
36
27
  super
37
28
  else
38
- puts "Sorry, this terminal does not support the #{self.class.name} plugin (requires iTerm2)"
29
+ puts "Sorry, this terminal does not support this plugin (requires iTerm2)"
39
30
  {}
40
31
  end
41
32
  end
@@ -1,5 +1,5 @@
1
1
  module Lolcommits
2
2
  module TermOutput
3
- VERSION = "0.0.4".freeze
3
+ VERSION = "0.0.5".freeze
4
4
  end
5
5
  end
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.required_ruby_version = ">= 2.0.0"
32
32
 
33
- spec.add_development_dependency "lolcommits", ">= 0.9.8"
33
+ spec.add_development_dependency "lolcommits", ">= 0.10.0"
34
34
  spec.add_development_dependency "bundler"
35
35
  spec.add_development_dependency "pry"
36
36
  spec.add_development_dependency "rake"
@@ -18,14 +18,6 @@ describe Lolcommits::Plugin::TermOutput do
18
18
  ENV['TMUX'] = @old_tmux
19
19
  end
20
20
 
21
- def plugin_name
22
- "term_output"
23
- end
24
-
25
- it "should have a name" do
26
- ::Lolcommits::Plugin::TermOutput.name.must_equal plugin_name
27
- end
28
-
29
21
  it "should run on capture ready" do
30
22
  ::Lolcommits::Plugin::TermOutput.runner_order.must_equal [:capture_ready]
31
23
  end
@@ -34,11 +26,7 @@ describe Lolcommits::Plugin::TermOutput do
34
26
  def runner
35
27
  # a simple lolcommits runner with an empty configuration Hash
36
28
  @runner ||= Lolcommits::Runner.new(
37
- main_image: Tempfile.new('main_image.jpg'),
38
- config: OpenStruct.new(
39
- read_configuration: {},
40
- loldir: File.expand_path("#{__dir__}../../../images")
41
- )
29
+ main_image: Tempfile.new('main_image.jpg')
42
30
  )
43
31
  end
44
32
 
@@ -47,18 +35,16 @@ describe Lolcommits::Plugin::TermOutput do
47
35
  end
48
36
 
49
37
  def valid_enabled_config
50
- @config ||= OpenStruct.new(
51
- read_configuration: { plugin_name => { "enabled" => true } }
52
- )
38
+ { enabled: true }
53
39
  end
54
40
 
55
41
  describe "#enabled?" do
56
42
  it "is false by default" do
57
- plugin.enabled?.must_equal false
43
+ assert_nil plugin.enabled?
58
44
  end
59
45
 
60
46
  it "is true when configured" do
61
- plugin.config = valid_enabled_config
47
+ plugin.configuration = valid_enabled_config
62
48
  plugin.enabled?.must_equal true
63
49
  end
64
50
  end
@@ -69,7 +55,7 @@ describe Lolcommits::Plugin::TermOutput do
69
55
 
70
56
  def check_plugin_output(matching_regex)
71
57
  in_repo do
72
- plugin.config = valid_enabled_config
58
+ plugin.configuration = valid_enabled_config
73
59
  output = fake_io_capture { plugin.run_capture_ready }
74
60
  output.must_match matching_regex
75
61
  end
@@ -109,7 +95,7 @@ describe Lolcommits::Plugin::TermOutput do
109
95
  configured_plugin_options = plugin.configure_options!
110
96
  end
111
97
 
112
- configured_plugin_options.must_equal({ "enabled" => true })
98
+ configured_plugin_options.must_equal({ enabled: true })
113
99
  end
114
100
 
115
101
  describe "when terminal not supported" do
@@ -126,7 +112,7 @@ describe Lolcommits::Plugin::TermOutput do
126
112
  end
127
113
 
128
114
  assert_equal configured_plugin_options, {}
129
- output.must_match(/Sorry, this terminal does not support the term_output plugin/)
115
+ output.must_match(/Sorry, this terminal does not support this plugin/)
130
116
  end
131
117
  end
132
118
  end
@@ -1,10 +1,7 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
 
3
- # necessary libs from lolcommits (allowing plugin to run)
4
- require 'git'
5
- require 'lolcommits/runner'
6
- require 'lolcommits/vcs_info'
7
- require 'lolcommits/backends/git_info'
3
+ # lolcommits gem
4
+ require 'lolcommits'
8
5
 
9
6
  # lolcommit test helpers
10
7
  require 'lolcommits/test_helpers/git_repo'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits-term_output
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Hutchinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-24 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lolcommits
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.8
19
+ version: 0.10.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.8
26
+ version: 0.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.6.13
142
+ rubygems_version: 2.7.3
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Display lolcommits within your iTerm terminal