joplin 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 7fada7c3ac2927ba5715b67437eac2fa1df0a33a24596e7a8619beadcabe27d2
4
- data.tar.gz: 694472244aad50df5c84395b647b40840e8aff6eafe76903ccd667806aeed50e
3
+ metadata.gz: 4b4f629e9d1111d44489677862012bb90708a49838db1c0453765e6c5e02cfb7
4
+ data.tar.gz: 54299abfa751d6fa58c0750e8dcf6e1a452124d2495b5604430ada3348574766
5
5
  SHA512:
6
- metadata.gz: 5d006b40cf72590d3c193cd71bf918044f06d4c379447d492c869b3c6533aaa0835196e7219d5ca9e483707206e7c739849d39a925d06542b2ced1dfdb742d77
7
- data.tar.gz: ffd27223a512c4538bb5e9156ad1ef1825a5f0123afc45907c2eeba4be719cd7ae0a596b2c638147cec3e76fe1a7cba0390321bcaeb93e5da3b07bade3bdf2a3
6
+ metadata.gz: e53f9e2c97f333220afe60a2f0972d783c917c5b94973464225daa544f12d0e9813870ec56a259bcb08a5029cabd90952ff7784a5eed26c23452abcae010faee
7
+ data.tar.gz: 1e88e83442899c217e413415af68ebdc7b71450c11086031b36508b8e90819a3e85c313fb9e2eb244465ff48737a38e6091d1b1f32d603f07c3cf37296e619f3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- joplin (0.2.2)
4
+ joplin (0.4.0)
5
5
  faraday (~> 1.0)
6
6
 
7
7
  GEM
@@ -41,4 +41,4 @@ DEPENDENCIES
41
41
  thor (~> 1.0)
42
42
 
43
43
  BUNDLED WITH
44
- 1.17.2
44
+ 1.17.3
data/Makefile CHANGED
@@ -7,5 +7,8 @@ push: clean all
7
7
  clean:
8
8
  rm -f *gem
9
9
 
10
+ test:
11
+ rake
12
+
10
13
  install: clean all
11
14
  gem install --local *gem
data/joplin.gemspec CHANGED
@@ -11,15 +11,15 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{joplin API}
13
13
  spec.description = %q{joplin API}
14
- spec.homepage = "http://github.com/danielb2/joplin"
14
+ spec.homepage = "http://github.com/danielb2/joplin-ruby"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
19
19
  if spec.respond_to?(:metadata)
20
20
  spec.metadata["homepage_uri"] = spec.homepage
21
- spec.metadata["source_code_uri"] = "http://github.com/danielb2/joplin"
22
- spec.metadata["changelog_uri"] = "http://github.com/danielb2/joplin"
21
+ spec.metadata["source_code_uri"] = "http://github.com/danielb2/joplin-ruby"
22
+ spec.metadata["changelog_uri"] = "http://github.com/danielb2/joplin-ruby"
23
23
  else
24
24
  raise "RubyGems 2.0 or newer is required to protect against " \
25
25
  "public gem pushes."
@@ -1,3 +1,3 @@
1
1
  module Joplin
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/joplin.rb CHANGED
@@ -17,6 +17,15 @@ module Joplin
17
17
  return parsed
18
18
  end
19
19
 
20
+ def self.get_token
21
+ begin
22
+ settings = JSON.parse File.read("#{ENV['HOME']}/.config/joplin-desktop/settings.json")
23
+ return settings['api.token']
24
+ rescue
25
+ return nil
26
+ end
27
+ end
28
+
20
29
  def self.token
21
30
  @@token
22
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joplin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bretoi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-27 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -102,15 +102,14 @@ files:
102
102
  - bin/setup
103
103
  - joplin.gemspec
104
104
  - lib/joplin.rb
105
- - lib/joplin/token.rb
106
105
  - lib/joplin/version.rb
107
- homepage: http://github.com/danielb2/joplin
106
+ homepage: http://github.com/danielb2/joplin-ruby
108
107
  licenses:
109
108
  - MIT
110
109
  metadata:
111
- homepage_uri: http://github.com/danielb2/joplin
112
- source_code_uri: http://github.com/danielb2/joplin
113
- changelog_uri: http://github.com/danielb2/joplin
110
+ homepage_uri: http://github.com/danielb2/joplin-ruby
111
+ source_code_uri: http://github.com/danielb2/joplin-ruby
112
+ changelog_uri: http://github.com/danielb2/joplin-ruby
114
113
  post_install_message:
115
114
  rdoc_options: []
116
115
  require_paths:
@@ -126,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
125
  - !ruby/object:Gem::Version
127
126
  version: '0'
128
127
  requirements: []
129
- rubygems_version: 3.0.3
128
+ rubygems_version: 3.0.9
130
129
  signing_key:
131
130
  specification_version: 4
132
131
  summary: joplin API
data/lib/joplin/token.rb DELETED
@@ -1,14 +0,0 @@
1
- require "sqlite3"
2
- module Joplin
3
- module Token
4
- def self.get
5
- begin
6
- db = SQLite3::Database.new "#{ENV['HOME']}/.config/joplin-desktop/database.sqlite"
7
- rows = db.execute("select value from settings where key='api.token';")
8
- return rows.flatten.first
9
- rescue
10
- return nil
11
- end
12
- end
13
- end
14
- end