ordinare 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 8566fad853305a7e8df3a8fe54e3df79865c93ca
4
- data.tar.gz: d72ccc3aae0cadb3a10306aaa73751836e0dec63
3
+ metadata.gz: 743972cecf02bab4d0a114da6a8651a12c94d92b
4
+ data.tar.gz: 89f6440b2527ce97870024f74a02de40c3dcd787
5
5
  SHA512:
6
- metadata.gz: e1188eea460b3e86824be3c654e5093fc8653820f14cf4eec4ba19a36e3b36da6800afdb864024b9de417d1caf207018a78130c7e4420184f89f1ad8196bda43
7
- data.tar.gz: 005c9150c4b7abd6a1564baa7d7d2ac4540177ce68cbec1bf3958fdc705eda8b9c2c6d32cba70fd87959a5aa4914eaa83274458d6642a9839708e51b80769cbf
6
+ metadata.gz: 6d8fe2162765bb5a34d6deb4d392d811c2bd2c1da169df4a7d80fd39e863018869975b72583be90c2060cfa6b51b04027c8902ed10e8a359d4b82df7478bc12d
7
+ data.tar.gz: 3b0c33285d24d861bb86e9107881784b4a6e93fc6493b3c932a9d8250d260464aeec8a327dc5fa625344d6ef9d3eb2c22287b0c53b7b34af77cd0781ea81fd54
@@ -12,6 +12,10 @@ module Ordinare
12
12
  OptionParser.new do |opts|
13
13
  opts.banner = "Usage: ordinare inside your Rails project"
14
14
 
15
+ opts.on("-pFILE", "--path=FILE", "Order file") do |filename|
16
+ Ordinare.sort(filename)
17
+ end
18
+
15
19
  opts.on("-v", "--version", "Check gem version") do
16
20
  puts Ordinare::VERSION
17
21
  end
@@ -26,13 +30,5 @@ module Ordinare
26
30
  unless File.file?(path)
27
31
  abort("No Gemfile found in the current directory, is this a Rails project with Gemfile?")
28
32
  end
29
-
30
- content = File.readlines(path)
31
-
32
- content.sort
33
-
34
- File.open("#{path}.ordinare", "w+") do |file|
35
- content.each { |line| file.puts(line) }
36
- end
37
33
  end
38
34
  end
@@ -1,3 +1,3 @@
1
1
  module Ordinare
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ordinare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Đuza