mks_common 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: 8037875a672bbe762cf4a2ca4ab3601e1f0999c23922d5391fc5a9d7a9f6f989
4
- data.tar.gz: 06cb645d05a757900949b9fa2ee57a5afce51ee23813ff93c3e1d35395e394ca
3
+ metadata.gz: 80e474ba2fe7880db805e7832817b59e6f267215c22dc15ccad52d61b80909a9
4
+ data.tar.gz: edd203f9bbbc5abd666ee622423ad55a93779088c38f4fb696f7d2051ffeab74
5
5
  SHA512:
6
- metadata.gz: 8b6d8d58830b80ef3aebd326dcbbc0bcb0ba2d83084f9daa6134f81d586b2bef6264d97353d46199a94b775bb91a3ebd561241835121ee74860560aef2314f2a
7
- data.tar.gz: 87b38dd380502ffadfc8495d094975e0250e9feb4b3346f0c33070a1077c568b07122ec20e336e94c1ababa9b00dac3e124e4f3b6b91f7e8462e7e7d3a069587
6
+ metadata.gz: 8d72d3377a7c2fb67e83699d1de08b8152de853ee3d7c384eca69a01364ba1f51e80961ddfc66e75d01a14b2b04390665066857d0f29b6254bfb1387d13bb7d0
7
+ data.tar.gz: bc2ede45debe5839ec40e1218b8052b38b3e4d95f846f33e237f5c50f04875826635821aca81ee96e7d0b6ea3699b4424f25dbb29a3dc4bb64b7ab2db1f24daf
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.gem
10
+ .DS_Store
11
+ .idea
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mkscommon.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mks_common (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.5)
10
+ json (1.8.3)
11
+ rake (10.4.2)
12
+ rspec (3.5.0)
13
+ rspec-core (~> 3.5.0)
14
+ rspec-expectations (~> 3.5.0)
15
+ rspec-mocks (~> 3.5.0)
16
+ rspec-core (3.5.4)
17
+ rspec-support (~> 3.5.0)
18
+ rspec-expectations (3.5.0)
19
+ diff-lcs (>= 1.2.0, < 2.0)
20
+ rspec-support (~> 3.5.0)
21
+ rspec-mocks (3.5.0)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.5.0)
24
+ rspec-support (3.5.0)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.12)
31
+ json
32
+ mks_common!
33
+ rake (~> 10.0)
34
+ rspec (~> 3.5)
35
+
36
+ BUNDLED WITH
37
+ 1.13.6
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Mkscommon
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/mkscommon`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'mkscommon'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install mkscommon
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mkscommon.
36
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "mkscommon"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,26 @@
1
+ require 'json'
2
+
3
+ module Mks
4
+ module Common
5
+ class MethodResponse
6
+ attr_accessor :success, :message, :data, :errors, :total
7
+
8
+ def initialize(success = nil, message = nil, data = nil, errors = [], total = nil)
9
+ @success = success
10
+ @message = message
11
+ @data = data
12
+ @errors = errors
13
+ @total = total
14
+ end
15
+
16
+ def self.success_response(data, msg = nil)
17
+ total = data.kind_of?(Array) ? data.count : nil
18
+ MethodResponse.new(true, msg, data, nil, total)
19
+ end
20
+
21
+ def self.failure_response(data)
22
+ data.errors.details
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ module Mks
2
+ module Common
3
+ VERSION = '1.0.2'.freeze
4
+ end
5
+ end
data/lib/mks_common.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'mks/common/version'
2
+
3
+ module Mks
4
+ module Common
5
+ end
6
+ end
@@ -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 'mks/common/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'mks_common'
8
+ spec.version = Mks::Common::VERSION
9
+ spec.authors = ['Henock L.']
10
+ spec.email = ['henockl@live.com']
11
+
12
+ spec.summary = 'Common reusable classes for MKS'
13
+ spec.description = 'This is a gem containing common reusable classes for MKS'
14
+ spec.homepage = 'http://mks.com.et'
15
+ spec.license = 'MIT'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = 'exe'
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_development_dependency 'bundler', '1.16.2'
23
+ spec.add_development_dependency 'rake', '12.3.1'
24
+ spec.add_development_dependency 'rspec', '3.7.0'
25
+ spec.add_development_dependency 'json', '2.1.0'
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mks_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2018-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.15.0
19
+ version: 1.16.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.15.0
26
+ version: 1.16.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 12.0.0
33
+ version: 12.3.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 12.0.0
40
+ version: 12.3.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.6.0
47
+ version: 3.7.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.6.0
54
+ version: 3.7.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,20 @@ email:
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
- files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - Gemfile.lock
81
+ - README.md
82
+ - Rakefile
83
+ - bin/console
84
+ - bin/setup
85
+ - lib/mks/common/methodresponse.rb
86
+ - lib/mks/common/version.rb
87
+ - lib/mks_common.rb
88
+ - mks_common.gemspec
76
89
  homepage: http://mks.com.et
77
90
  licenses:
78
91
  - MIT
@@ -92,7 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
105
  - !ruby/object:Gem::Version
93
106
  version: '0'
94
107
  requirements: []
95
- rubygems_version: 3.0.3
108
+ rubyforge_project:
109
+ rubygems_version: 2.7.6
96
110
  signing_key:
97
111
  specification_version: 4
98
112
  summary: Common reusable classes for MKS