dev 1.0.233 → 1.0.235

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,6 @@ class Environment
22
22
  return ENV[v].gsub('\\','/') unless ENV[v].nil?
23
23
  }
24
24
  dir="~"
25
- #dir=ENV["HOME"] unless ENV["HOME"].nil?
26
- #dir=ENV["USERPROFILE"].gsub('\\','/') unless ENV["USERPROFILE"].nil?
27
25
  end
28
26
 
29
27
  def self.dev_root
data/lib/dev/Project.rb CHANGED
@@ -65,6 +65,35 @@ class Project < Hash
65
65
  #db = Dev::Database.new
66
66
  #db.set_branch_uri(self[:fullname],self[:scm_uri])
67
67
  puts_debug "DEV refresh elapsed time " + (Time.now-start_time).to_s
68
+
69
+ begin
70
+ updateProductsDB
71
+ rescue
72
+ end
73
+ end
74
+
75
+ def updateProductsDB
76
+ filename = Dev::Environment.user_profile + "/Development.sql"
77
+ if(File.exists?(filename) && !DEV[:scm_uri].nil? && DEV[:scm_uri].length > 0)
78
+ db = SQLite3::Database.new filename
79
+ insert = true
80
+ id=nil
81
+ db.execute("select * from Products where name='" + DEV[:fullname] + "';") do |row|
82
+ id=row[0]
83
+ name=row[1].to_s
84
+ uri=row[2].to_s
85
+ insert = false if(name==DEV[:fullname] && uri==DEV[:scm_uri])
86
+ end
87
+ if(insert)
88
+ sid="null"
89
+ sid=id.to_s if !id.nil?
90
+ sql="insert or replace into Products VALUES(" + sid + ",'" + DEV[:fullname].to_s + "','" + DEV[:scm_uri].to_s + "');"
91
+ puts_debug "sql=#{sql}"
92
+ db.execute(sql)
93
+ db.close
94
+ db=nil
95
+ end
96
+ end
68
97
  end
69
98
 
70
99
  def get_default_value_name
data/lib/dev/Scm.rb CHANGED
@@ -107,7 +107,7 @@ class Scm
107
107
  text=`svn info`
108
108
  if(!text.include?("not a working copy"))
109
109
  text.scan(/URL: ([\w:\/.-]+)/).each { |m|
110
- return m
110
+ return m[0]
111
111
  }
112
112
  end
113
113
  return nil
@@ -220,11 +220,21 @@ class SystemCall
220
220
  dir="~"
221
221
  end
222
222
 
223
+ def split(input)
224
+ m = /(?:'(?:\\.|[^'])*'|[^' ])+/.match(input)
225
+ end
226
+
223
227
  def log
224
228
  filename = user_profile + "/CommandHistory.sql"
225
229
  sql=""
226
230
  if(File.exists?(filename))
227
231
  begin
232
+ words = split(@command)
233
+ cmd = words[0]
234
+ arguments = @command.gsub("#{cmd} ","");
235
+ executable = cmd
236
+ cmd = File.basename(executable).gsub(File.extname(executable),"");
237
+
228
238
  db = SQLite3::Database.new filename
229
239
  @timeout=0 if @timeout.nil?
230
240
  @dir=Rake.original_dir() if(@dir.nil?)
@@ -232,17 +242,19 @@ class SystemCall
232
242
  "','" + @end_time.strftime('%Y-%m-%dT%H:%M:%S') +
233
243
  "','" + Time.at(elapsed).gmtime.strftime('%H:%M:%S') +
234
244
  "'," + @status.to_s +
235
- ",'" + @command.gsub("'","''") +
245
+ ",'" + cmd + #@command.gsub("'","''") +
246
+ "','" + arguments +
236
247
  "','" + @dir.to_s +
237
248
  "','" + @output.gsub("'", "''") +
238
249
  "','" + @error.gsub("'", "''") +
250
+ "','" + executable +
239
251
  "'," + @timeout.to_s + ")"
240
252
  sql="insert into Commands #{values};"
241
253
  db.execute(sql)
242
254
  db.close
243
255
  db=nil
244
256
  rescue
245
- puts "failed to execute '#{sql}'"
257
+ #puts_debug "failed to execute '#{sql}'"
246
258
  end
247
259
  end
248
260
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.233
4
+ version: 1.0.235
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Lou Parslow
@@ -13,169 +14,193 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: semver
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: countloc
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rainbow
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - '>='
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - '>='
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: systemu
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - '>='
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - '>='
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: sqlite3
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0'
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: rubyzip
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - '>='
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - '>='
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: uuidtools
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - '>='
131
+ - - ! '>='
116
132
  - !ruby/object:Gem::Version
117
133
  version: '0'
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - '>='
139
+ - - ! '>='
123
140
  - !ruby/object:Gem::Version
124
141
  version: '0'
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: json
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
- - - '>='
147
+ - - ! '>='
130
148
  - !ruby/object:Gem::Version
131
149
  version: '0'
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
- - - '>='
155
+ - - ! '>='
137
156
  - !ruby/object:Gem::Version
138
157
  version: '0'
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: rspec
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
- - - '>='
163
+ - - ! '>='
144
164
  - !ruby/object:Gem::Version
145
165
  version: '0'
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
- - - '>='
171
+ - - ! '>='
151
172
  - !ruby/object:Gem::Version
152
173
  version: '0'
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: cucumber
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
- - - '>='
179
+ - - ! '>='
158
180
  - !ruby/object:Gem::Version
159
181
  version: '0'
160
182
  type: :development
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
- - - '>='
187
+ - - ! '>='
165
188
  - !ruby/object:Gem::Version
166
189
  version: '0'
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: bundler
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
- - - '>='
195
+ - - ! '>='
172
196
  - !ruby/object:Gem::Version
173
197
  version: '0'
174
198
  type: :development
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
- - - '>='
203
+ - - ! '>='
179
204
  - !ruby/object:Gem::Version
180
205
  version: '0'
181
206
  description: development tasks
@@ -216,26 +241,27 @@ files:
216
241
  - bin/devgem
217
242
  homepage: http://rubygems.org/gems/dev
218
243
  licenses: []
219
- metadata: {}
220
244
  post_install_message:
221
245
  rdoc_options: []
222
246
  require_paths:
223
247
  - lib
224
248
  required_ruby_version: !ruby/object:Gem::Requirement
249
+ none: false
225
250
  requirements:
226
- - - '>='
251
+ - - ! '>='
227
252
  - !ruby/object:Gem::Version
228
253
  version: 1.8.6
229
254
  required_rubygems_version: !ruby/object:Gem::Requirement
255
+ none: false
230
256
  requirements:
231
- - - '>='
257
+ - - ! '>='
232
258
  - !ruby/object:Gem::Version
233
259
  version: '0'
234
260
  requirements: []
235
261
  rubyforge_project: dev
236
- rubygems_version: 2.0.3
262
+ rubygems_version: 1.8.24
237
263
  signing_key:
238
- specification_version: 4
264
+ specification_version: 3
239
265
  summary: dev
240
266
  test_files: []
241
267
  has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: a015dbb0623d97526d1c798a552b78803a125548
4
- data.tar.gz: 3ef1c8af9f49c5018d88e130129a2d07805ef702
5
- SHA512:
6
- metadata.gz: f37a6a83b5ab407c4a68e39c05de70aeb914e4657f7e93c15c52b8a77e88069fe69e4b23965682149e416e33411fde3a4f20a902466079ca54220191b8ed70b8
7
- data.tar.gz: b313d76b77d9123d8c3377728a6d74662f684e1e9a13da3111bb6d3fd7445de89b98f60126450417b23d95c82cb306052b7a221dd0c6209bb10efd3f94384bba