dev_commands 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/command.rb +3 -1
- data/lib/doc.rb +5 -1
- data/lib/push.rb +3 -2
- data/lib/text.rb +2 -1
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9735ba699f23220a2ef5cd5d44c6ae602bbfb2e
|
4
|
+
data.tar.gz: 47c2bcb06cc628f1b7da900eae8647dd3de6708e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be18a1c6a3870e0ccb80e34d1ea9fd58d1b61934d7940507a4c64d3d72d3fed8a6de6cb10b2e4310f80dcb0bfa6c832a9b7f6bb8f678010b5c2b8af8e5777687
|
7
|
+
data.tar.gz: b4db894727c08625dfdcb67c10a8c789fe264e2818971c4dd79953e4219f09976c4861f256979d2996dd7b87237570a259f0db7d6cae17a9445a6a3ac309ee16
|
data/lib/command.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'open3'
|
2
4
|
require_relative('./array.rb')
|
3
5
|
require_relative('./hash.rb')
|
@@ -78,7 +80,7 @@ class Command < Hash
|
|
78
80
|
puts self[:output]
|
79
81
|
puts self[:error]
|
80
82
|
puts ' '
|
81
|
-
raise "#{self[:input]} failed" unless self.has_key?(
|
83
|
+
raise "#{self[:input]} failed" unless self.has_key?(ç) && self[:ignore_failure]
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
data/lib/doc.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
class Doc < Array
|
2
2
|
def update
|
3
|
-
|
3
|
+
cmd=Command.new ({ :input => 'yard --version', :ignore_failure => true})
|
4
|
+
cmd.execute
|
5
|
+
if(cmd[:exit_code]==0)
|
6
|
+
add 'yard doc - LICENSE' if File.exists?('README.md') && File.exists?('LICENSE')
|
7
|
+
end
|
4
8
|
end
|
5
9
|
end
|
data/lib/push.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
class Push < Array
|
2
2
|
def update
|
3
|
-
if(File.exists?('.git'))
|
4
|
-
add 'git
|
3
|
+
if(File.exists?('.git') && `git config --list`.include?('user.name='))
|
4
|
+
add 'git config --global push.default simple'
|
5
|
+
self << 'git push' if Git.branch != 'develop'
|
5
6
|
end
|
6
7
|
end
|
7
8
|
end
|
data/lib/text.rb
CHANGED
@@ -4,7 +4,8 @@ class Text
|
|
4
4
|
end
|
5
5
|
|
6
6
|
def self.replace_in_file(filename,search,replace)
|
7
|
-
text1 =
|
7
|
+
text1 = IO.read(filename).force_encoding("ISO-8859-1").encode("utf-8", replace: nil)
|
8
|
+
#File.read(f,:encoding=>'UTF-8')
|
8
9
|
text2 = text1.gsub(search) { |str| str=replace }
|
9
10
|
unless text1==text2
|
10
11
|
File.open(filename,"w") { |f| f.puts text2 }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +108,20 @@ dependencies:
|
|
94
108
|
- - '>='
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: yard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: execution of system commands
|
98
126
|
email: lou.parslow@gmail.com
|
99
127
|
executables: []
|