testSG 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 796aa18f45e9adbd3240040fe9ec7ec5fce2d519
4
+ data.tar.gz: b2fc9ff490451cd3362ead9c351f093d963b2939
5
+ SHA512:
6
+ metadata.gz: 8d9e9eb68ded82d6a9d24384a8dbd4c3d93b0e5766ed4e65d7c65754ff863e1182de0d1a9d2c603e56fee9cb53dd022e2ecbe525b25b77791a69250378ea473a
7
+ data.tar.gz: 36391eccae0026231a84d33869b32db6f2b6f16803962aa5418d903bc29afa6acda2342a35b91cf808e4b3050b47853d9bd6f2d0bf09d303b0cd1998e41bb904
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in testSG.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Saurabh Gupte
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # TestSG
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'testSG'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install testSG
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/testSG/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/lib/testSG.rb ADDED
@@ -0,0 +1,8 @@
1
+ require "testSG/version"
2
+ require "testSG/connector/mongo_db"
3
+
4
+ module TestSG
5
+ def self.greet
6
+ puts "Your test gem!"
7
+ end
8
+ end
@@ -0,0 +1,34 @@
1
+ require 'mongo'
2
+
3
+ module MongoDB
4
+ class Connector
5
+ def initialize(host,port)
6
+ @mongo_client = Mongo::MongoClient.new(host, port)
7
+ end
8
+
9
+ def insert(dbname, collection, doc)
10
+ # Connect to a specific DB within mongo
11
+ db = @mongo_client.db(dbname)
12
+
13
+ # Set the schema/collection in the db chosen
14
+ coll = db.collection(collection)
15
+
16
+ # Create a document that needs to be inserted in the collection
17
+ # doc = {"name" => "MongoDB", "type" => "database", "count" => 1, "info" => {"x" => 203, "y" => '102'}}
18
+
19
+ # Perform the insert
20
+ id = coll.insert(doc)
21
+ end
22
+
23
+ def select(dbname, collection)
24
+ # Connect to a specific DB within mongo
25
+ db = @mongo_client.db(dbname)
26
+
27
+ # Set the schema/collection in the db chosen
28
+ coll = db.collection(collection)
29
+
30
+ # Query the collection to view all the documents.
31
+ coll.find.each { |row| puts row.inspect }
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,3 @@
1
+ module TestSG
2
+ VERSION = "0.0.7"
3
+ end
data/testSG-0.0.1.gem ADDED
Binary file
data/testSG-0.0.2.gem ADDED
Binary file
data/testSG-0.0.3.gem ADDED
Binary file
data/testSG.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'testSG/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "testSG"
8
+ spec.version = TestSG::VERSION
9
+ spec.authors = ["Saurabh Gupte"]
10
+ spec.email = ["saurabh.gupte@capitalone.com"]
11
+ spec.summary = %q{Learning how to create a gem}
12
+ spec.description = %q{Learn how to create a gem using RubyMine}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "mongo", "~> 1.11.1"
24
+ spec.add_development_dependency "bson", "~> 1.11.1"
25
+ spec.add_development_dependency "bson_ext", "~> 1.11.1"
26
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: testSG
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.7
5
+ platform: ruby
6
+ authors:
7
+ - Saurabh Gupte
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mongo
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.11.1
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.11.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: bson
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.11.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.11.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: bson_ext
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.11.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.11.1
83
+ description: Learn how to create a gem using RubyMine
84
+ email:
85
+ - saurabh.gupte@capitalone.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
94
+ - Rakefile
95
+ - lib/testSG.rb
96
+ - lib/testSG/connector/mongo_db.rb
97
+ - lib/testSG/version.rb
98
+ - testSG-0.0.1.gem
99
+ - testSG-0.0.2.gem
100
+ - testSG-0.0.3.gem
101
+ - testSG.gemspec
102
+ homepage: ''
103
+ licenses:
104
+ - MIT
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubyforge_project:
122
+ rubygems_version: 2.2.2
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Learning how to create a gem
126
+ test_files: []