quick_target 0.0.0 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f294d1c44dc0207e9b75468b1ed6888249f7b8a5
4
- data.tar.gz: 3f08dc3991b6ff7eb44832edfa5cb1d5a5daf410
3
+ metadata.gz: ce61d3b924ba5315134c7a61c92a59c994c9bbc7
4
+ data.tar.gz: d633a51e7c3962bce7ce7df415fcd8bf7cca9c5c
5
5
  SHA512:
6
- metadata.gz: f11b94240d617c33a72e69d8efd72390feca75ea48a34ab770ccea1f85faaef4fe6e189904710c8e7e7f753f52b1ebbdb3e4b61343d0631b12ebd7f75560d0c5
7
- data.tar.gz: d55c3a4d381a853c018a94f8e5fa9f8a2fcb7a576abc7a3fcfcf6c78f1d23c120114fc828ce795f79bd3085b305962bcd533241f72eb2f075d0c6545424c70ef
6
+ metadata.gz: 61fc005f629fbcb578cbe012f393edc100e502117a7a05b0e87c1becfb7fc358c2e3e6ce47de83ad100d89f61d5f21dfc56a933ea5202e672c6cce465704ebb8
7
+ data.tar.gz: 39d583ae3f219bf3b4d0b371d0db33d2f7cd55cd2ee8e44f9977a618ac6e74f1e3ce9dfc6bde7aacef3528c16bf99c0ee8c6da89c727db5ac0c0b41a1bbd00e6
data/bin/test ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'quick_target'
4
+ puts QuickTarget.hi(ARGV[0])
5
+
6
+ # All it’s doing is loading up the gem, and passing the first command line argument as the language to say hello with. Here’s an example of running it:
7
+
8
+ # % ruby -Ilib ./bin/test
9
+ # hello world
10
+
11
+ # % ruby -Ilib ./bin/test spanish
12
+ # hola mundo
data/lib/quick_target.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  class QuickTarget
2
- def self.hi
3
- puts "Hello world!"
2
+ def self.hi(language = "english")
3
+ translator = Translator.new(language)
4
+ translator.hi
4
5
  end
5
- end
6
+ end
7
+
8
+ # load the quick_target/translator.rb file
9
+ require 'quick_target/translator'
@@ -0,0 +1,14 @@
1
+ class QuickTarget::Translator
2
+ def initialize(language)
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ else
11
+ "hello world"
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick_target
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavan Katepalli
@@ -14,11 +14,14 @@ description: Quickly target anyone via SQL and send an email to all of those use
14
14
  Easily schedule these emails, and easily let users unsubscribe with 2 clicks from
15
15
  the email.
16
16
  email: pavankat@gmail.com
17
- executables: []
17
+ executables:
18
+ - test
18
19
  extensions: []
19
20
  extra_rdoc_files: []
20
21
  files:
22
+ - bin/test
21
23
  - lib/quick_target.rb
24
+ - lib/quick_target/translator.rb
22
25
  homepage: http://rubygems.org/gems/quick_target
23
26
  licenses:
24
27
  - MIT