gitall 1.1.15 → 1.1.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4fcb2bd7529f17844eda9c2cd6258e5085b8aab55a127e24a146a2f67057dc7
4
- data.tar.gz: f53265464f613a0c120bc5e889be7cb85c065a298111e2a7743d4af43c2299ad
3
+ metadata.gz: 7cb3ce28a568994665a60afa686eff24ca926a597ea03c5ba7b2eccea6730f69
4
+ data.tar.gz: 0ec7f5c051dd5df54aa3b59dcafd83801c8c61af727b38623243c03b892e3fc4
5
5
  SHA512:
6
- metadata.gz: 1a40e56b96b4c1e3c7108aae6b21779020d84f2b86682b94eefe823c191680b7efd6ea866a370eacdbd67740f8872fd5e33d4eb90817ee94297cfc9383f6716f
7
- data.tar.gz: 0f5a67ed0f517707ba738ee3b7d6369ddff23df25235e69110782dd6bc24d9c423cf30755fade6c283ed608e93a631b32670e23e269f9d5cf2c73c8e55f13952
6
+ metadata.gz: ed7bb3d67b3ff975cafb06f1c3f86ac16cecac4d79cf56b3159cabb2248c1cada82e5928ceddfd101d13eb14f06753d1ed607dc6d9a03cd319d9b5cf8b2f9e62
7
+ data.tar.gz: 98e3fcf64e1aff52c8030bf1fc047e834e50df60758a29b288d77add9eeb5732d75f3b242d1dc8b0b3e0a5a57282eb3d6104fa6c68b81f796d5bb240b0420267
@@ -19,14 +19,14 @@ class ChanControl
19
19
  # @param [Hash] msg the data to write
20
20
  def toFile(msg)
21
21
  data = msg
22
- File.open(`echo ~/.gitall-rc.yml`.chomp, 'w') {|f| f.write(data.to_yaml) }
22
+ File.open(Pathname(Dir.home).join('.gitall-rc.yml'), 'w') {|f| f.write(data.to_yaml) }
23
23
  end
24
24
 
25
25
  # Load the config
26
26
  # @return [Hash] load the current config
27
27
  def deFile
28
28
  begin
29
- parsed = YAML.load(File.open(`echo ~/.gitall-rc.yml`.chomp, 'r'))
29
+ parsed = YAML.load_file(Pathname(Dir.home).join('.gitall-rc.yml'))
30
30
  rescue ArgumentError => e
31
31
  puts "Could not parse YAML: #{e.message}"
32
32
  end
@@ -49,8 +49,9 @@ class ChanControl
49
49
  # @param [ChannelList] channels | separated list of channels in the format
50
50
  # of #channel,net
51
51
  def padd(m, namespace = nil, host = nil, token = nil, channels = nil)
52
+ project = ''
52
53
  if namespace.nil?
53
- m.reply 'Syntax: padd {OWNER/PROJECT} {github, gitlab, bitbucket}
54
+ m.reply 'Syntax: padd {OWNER/PROJECT} {github, gitlab}
54
55
  XXXXXXTOKEN #channel,network[|#channel2,network|#channel3,network2]'
55
56
  m.reply 'GitALL works best when using owner/repo webhooks, organization hooks have not been tested.'
56
57
  else
@@ -66,7 +67,7 @@ config.")
66
67
  channels: channels.split('|')
67
68
  }
68
69
  toFile(config)
69
- project = deFile().dig(:projects, namespace)
70
+ project = deFile.dig(:projects, namespace)
70
71
  m.user.send("Inputted: #{project}")
71
72
  end
72
73
  # @param [String] host
@@ -113,12 +114,12 @@ haven't already.")
113
114
  # @param [Channel] channel name of channel
114
115
  # @note Ensures that the channel is joined or known of
115
116
  # @returns Boolean true/false
116
-
117
117
  def self.joined(channel)
118
118
  Channel(channel) ? true : false
119
119
  end
120
- # @param [Object] m Object
121
120
 
121
+ # @param [Cinch::Message] m A cinch message object
122
+ # @param [String] project Project name
122
123
  def listchans(m, project = nil)
123
124
  return unless authenticated? m
124
125
  project_hash = deFile['projects'][project]
@@ -1,3 +1,3 @@
1
1
  module GitAll
2
- VERSION = '1.1.15'
2
+ VERSION = '1.1.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.15
4
+ version: 1.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Spencer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-25 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch