sbag 2.2.0 → 2.2.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sbag/version.rb +1 -1
  3. data/lib/sbag.rb +34 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0157498ab505430d1a74494e83d4685ac9f6c28c
4
- data.tar.gz: 5e4a919d138c6a3babec530fa5bad6a42a43b471
3
+ metadata.gz: de24abbc6beafe6ea3e1db0e07b0ba836ba6f3fe
4
+ data.tar.gz: 24611294d4e7c21670599c9ba4910ff029700e58
5
5
  SHA512:
6
- metadata.gz: a2e347e7e8cd53366e314430bba8ae0c0832721bc2c59ae87444234921fd2cac81a08eba39623f2f8b474f35a293d270cdc8c83f17ea2e58ab908d64d947669b
7
- data.tar.gz: 55fb54c1a9100535ce6866a106eb2f5d15176dc22a318f64c463ff7e614b0980e5aadac23481a381a1f41f402939c44b75229b64867050063c0d8bf84a29f6a8
6
+ metadata.gz: 4daacc5ea0cbdf632266e8a8e4f7b13f3e3d98b5952e25bdc9f01afc18c44b173c574004fe38e667c52e93b431b7144a348f6f4f178380ff84a5bcaa096ed871
7
+ data.tar.gz: 96c22f2d66359ad55e1d4e6dae3d59b9ed5a7e4ad533b81c41ceedd39021040345915133779571ffd816b681018f816e446890db8f55d730cbedbb9c7741adba
data/lib/sbag/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sbag
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
data/lib/sbag.rb CHANGED
@@ -185,5 +185,39 @@ method_option :add , :alises => "-add", :desc => "Use the kit add command to int
185
185
  end
186
186
  end
187
187
  # add command Ends=======================================>>>
188
+ # status command Starts====================================>>>>
189
+ desc "status" , "Status checking command. Usage status [version_no] [file_name]"
190
+ method_option :status, :aliases => "-status", :desc => "Use this command to compare the two files"
191
+
192
+ def status(version_no, file_name)
193
+
194
+ puts "Comparing file is #{file_name} in v#{version_no}".yellow
195
+
196
+ #Current_file_path
197
+ current_file_path = FileUtils.pwd()
198
+
199
+ #Switch into kit folder
200
+ Dir.chdir "kit"
201
+
202
+ #Reading the file system.txt
203
+ system_file_data = File.new("system.txt","r")
204
+ project_dir_name = system_file_data.sysread(100)
205
+ puts project_dir_name
206
+
207
+ #Go back to previous directory
208
+ previous_dir = File.expand_path("../.", Dir.pwd)
209
+ Dir.chdir "#{previous_dir}"
210
+ puts FileUtils.pwd()
211
+
212
+ #Procedure for going into old kit version directory
213
+ version = "kit/v#{version_no}/"
214
+ Dir.chdir("#{version}")
215
+ puts "You are in v#{version_no} of your project".yellow
216
+ old_file_path = FileUtils.pwd()
217
+ puts old_file_path
218
+ puts Diffy::Diff.new(old_file_path , current_file_path , :source => 'files', :include_diff_info => true, :allow_empty_diff => false, :context => 10000000000000000).to_s(:color)
219
+
220
+ end
221
+ # status command Ends====================================>>>
188
222
  end
189
223
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shubham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-14 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor