sqlize 0.1.1 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93899672c76f3e32669ab41a3a5df676574c55da
4
- data.tar.gz: 5b49d9baf8e9a024d6569eb8478d7cb5e442bfba
3
+ metadata.gz: 84afd8b686325614ebcc8334114745ac3baee187
4
+ data.tar.gz: 687942c9e95b61af9b1c1900f5ff26a1fd693263
5
5
  SHA512:
6
- metadata.gz: 93a5a447e17608966d361934e9c01f8135e1e486d524da5c5be3ed1151e43d0b922b9bebce4b5bba678460302def0183ce1110a2dee14c5090215631597390d5
7
- data.tar.gz: 6ee7c471b36dc9c49c49c630016a73041fdb62aa01bfbb1dc885439ad50bfd7f35f62d72f9fb0ce998ab98aeb000a595758534a69f83479a3fa2d32e5132f21a
6
+ metadata.gz: 4fafadf5b628954825819e60b1b08cf4ffa25760f51ea6350f64b0de9d7bfa5aa4d9d08b7aac7b8a93f341317f0fe1223f2f97b10a23c9538da92befea7aeb5a
7
+ data.tar.gz: 6e03ad3fdeae85a21248473bbe7c270fcf5c1c429c07a42024d382aead976a7f663e86a8817b0e54217e87f8997dbb0c152ca111f624ac90785ebad70bf81d90
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in sqlize.gemspec
4
4
  gemspec
5
+
6
+ group :development, :test do
7
+ gem 'rspec'
8
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sqlize (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.5)
10
+ rake (10.5.0)
11
+ rspec (3.4.0)
12
+ rspec-core (~> 3.4.0)
13
+ rspec-expectations (~> 3.4.0)
14
+ rspec-mocks (~> 3.4.0)
15
+ rspec-core (3.4.4)
16
+ rspec-support (~> 3.4.0)
17
+ rspec-expectations (3.4.0)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.4.0)
20
+ rspec-mocks (3.4.1)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.4.0)
23
+ rspec-support (3.4.1)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ bundler (~> 1.11)
30
+ rake (~> 10.0)
31
+ rspec
32
+ sqlize!
33
+
34
+ BUNDLED WITH
35
+ 1.11.2
data/README.md CHANGED
@@ -1,41 +1,29 @@
1
1
  # Sqlize
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sqlize`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ awesome gr8 command line utility to transform ur lowercase sql kerywords to glorious uppercase WOOO
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ```sh
6
+ # works on files
7
+ cat my_sucky.sql
8
+ # => "update script set keywords = upper(keywords)"
6
9
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
+ sqlize my_sucky.sql
11
+ # => "UPDATE script SET keywords = UPPER(keywords)"
10
12
 
11
- ```ruby
12
- gem 'sqlize'
13
+ # wokrs on inline strings 2 oh shit
14
+ sqlize -c "select name from products where price < 20.00;"
15
+ # => SELECT name FROM products WHERE price < 20.00;
13
16
  ```
14
17
 
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install sqlize
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
18
+ ## Installation
19
+ quit playin!!! `gem install sqlize`
26
20
 
27
21
  ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
22
+ test ur shit
32
23
 
33
24
  ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sqlize.
36
-
25
+ john.marinelli@paypal.com
26
+ __IMPORTANT!!__ *i only accept payments in increments of 100$*
37
27
 
38
28
  ## License
39
-
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
29
+ watever
data/bin/sqlize CHANGED
@@ -2,4 +2,11 @@
2
2
 
3
3
  require 'sqlize'
4
4
 
5
- print BillyMays::Postgresql.new(ARGV[0]).capitalize.to_s
5
+ orig_str = ''
6
+ if ARGV[0] == '-c'
7
+ orig_str = ARGV[1]
8
+ else
9
+ orig_str = File.read ARGV[0]
10
+ end
11
+
12
+ print BillyMays::Postgresql.new(orig_str).capitalize.to_s
@@ -1,3 +1,3 @@
1
1
  module Sqlize
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/sqlize.rb CHANGED
@@ -18,14 +18,11 @@ module BillyMays
18
18
  POSTGRESQL_KEYWORDS = SQL_KEYWORDS | %w(
19
19
  )
20
20
 
21
- class NotImplementedError < StandardError; end
22
-
23
21
  class CapitalizeWords
24
22
  attr_reader :keywords
25
- attr_accessor :filepath, :orig, :capitalized
26
- def initialize(filepath)
27
- @filepath= filepath
28
- @orig = File.read @filepath
23
+ attr_accessor :orig, :capitalized
24
+ def initialize(orig)
25
+ @orig = orig
29
26
  end
30
27
 
31
28
  def capitalize
@@ -34,9 +31,16 @@ module BillyMays
34
31
  end
35
32
  end
36
33
 
34
+ class SQL < CapitalizeWords
35
+ def initialize(orig)
36
+ super orig
37
+ @keywords = SQL_KEYWORDS
38
+ end
39
+ end
40
+
37
41
  class Postgresql < CapitalizeWords
38
- def initialize(filepath)
39
- super filepath
42
+ def initialize(orig)
43
+ super orig
40
44
  @keywords = POSTGRESQL_KEYWORDS
41
45
  end
42
46
  end
data/sqlize-0.1.1.gem ADDED
Binary file
data/sqlize.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["john.marinelli.dev@gmail.com"]
11
11
 
12
12
  spec.summary = %q{have u ever wanted to shout SELECTed words???/}
13
- spec.description = %q{now u can. UPDATE ur noob sql scripting FROM lowercase to uppercase}
13
+ spec.description = %q{have u ever wanted to shout SELECTed words??? now u can. UPDATE ur noob sql scripting FROM lowercase to uppercase}
14
14
  spec.homepage = "http://github.com/BILLYMAYSQL"
15
15
  spec.license = "IDC"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnmarinelli
@@ -52,7 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: now u can. UPDATE ur noob sql scripting FROM lowercase to uppercase
55
+ description: have u ever wanted to shout SELECTed words??? now u can. UPDATE ur noob
56
+ sql scripting FROM lowercase to uppercase
56
57
  email:
57
58
  - john.marinelli.dev@gmail.com
58
59
  executables:
@@ -62,6 +63,7 @@ extra_rdoc_files: []
62
63
  files:
63
64
  - ".gitignore"
64
65
  - Gemfile
66
+ - Gemfile.lock
65
67
  - LICENSE.txt
66
68
  - README.md
67
69
  - Rakefile
@@ -71,6 +73,7 @@ files:
71
73
  - lib/sqlize.rb
72
74
  - lib/sqlize/version.rb
73
75
  - sqlize-0.1.0.gem
76
+ - sqlize-0.1.1.gem
74
77
  - sqlize.gemspec
75
78
  - sqlize/.gitignore
76
79
  - sqlize/.rspec