ppl 4.0.0 → 4.0.1

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: a028d8682930e39c6389a412dcc8d184b651b7fbcd45884e03865cf51ccedee4
4
- data.tar.gz: 23e77730f17c512b5d7e59f5d6bda1f2dd54e99628d110ebb3fbd9b5efa376b6
3
+ metadata.gz: d7e7227e67ddcd57d56016f63b0d40b51c2989d62f9f0d42b764535c1176a436
4
+ data.tar.gz: 9444983ccb14e1ee6d73626fed21a5aaf7c6aba89013dff4d706b088bb57e654
5
5
  SHA512:
6
- metadata.gz: e2981dfd3deddc4e52938681ce6ec9278d06d93bc0719572b12706ebe9fb2fd9aabec1e3c6e54a23d70a1e4145eadd9693823951ce837044298516af9da70dd1
7
- data.tar.gz: d0378f569f3f93a0df75d55da9ba62e335681fc2449c33dbe0726c367de3146be046762f790000235499bb88adb95fe726ee3ed33dd8f256b5aa054d28be1af7
6
+ metadata.gz: f3efe966f2e4d2d0f19b87392a2643e457b8cb71c49916000ca5ec0c2060f8238d41110b59203b1eb4dda48703f2c7bee52880e7486235647eb1e345d9b93d83
7
+ data.tar.gz: a2b65af534bc75927673e93387ac35056b376337a31ad28e175ba5606b1717d5b31bea46cb2661b7539ff9d0aba1e8276a3b71d04ed75c7a3b8c111edf4bf472
@@ -1,5 +1,11 @@
1
1
  name: Build
2
- on: push
2
+ on:
3
+ push:
4
+ branches:
5
+ - trunk
6
+ pull_request:
7
+ branches:
8
+ - trunk
3
9
 
4
10
  jobs:
5
11
  test:
@@ -16,8 +22,8 @@ jobs:
16
22
  run: bundle install
17
23
  - name: rspec
18
24
  run: bundle exec rake spec
19
- #- name: cucumber
20
- # run: bundle exec rake features
25
+ - name: cucumber
26
+ run: bundle exec rake features
21
27
  - uses: dawidd6/action-publish-gem@v1
22
28
  continue-on-error: true
23
29
  if: ${{ github.ref == 'refs/heads/trunk' }}
@@ -4,8 +4,8 @@ class Ppl::Adapter::EmailScraper::Mail
4
4
 
5
5
  attr_writer :storage_adapter
6
6
 
7
- def scrape_contacts(email)
8
- email = Mail.new(email)
7
+ def scrape_contacts(message)
8
+ email = Mail.new(message)
9
9
  contacts = []
10
10
 
11
11
  sender = scrape_sender(email)
@@ -23,9 +23,9 @@ class Ppl::Adapter::EmailScraper::Mail
23
23
  unless from.nil?
24
24
  sender = Ppl::Entity::Contact.new
25
25
  sender.name = Ppl::Entity::Name.new
26
- display_name = from.tree.addresses.first.display_name
26
+ display_name = from.address_list.addresses.first.display_name
27
27
  sender.name.full = Mail::Encodings.value_decode(display_name) unless display_name.nil?
28
- sender.email_addresses << Ppl::Entity::EmailAddress.new(from.tree.addresses.first.address)
28
+ sender.email_addresses << Ppl::Entity::EmailAddress.new(from.address_list.addresses.first.address)
29
29
  sender.id = generate_contact_id(sender)
30
30
  sender.name.full = sender.id if display_name.nil?
31
31
  sender
data/ppl.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |spec|
2
2
 
3
3
  spec.name = "ppl"
4
- spec.version = "4.0.0"
4
+ spec.version = "4.0.1"
5
5
  spec.date = "2021-04-02"
6
6
 
7
7
  spec.required_ruby_version = ">= 3.0.0"
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.add_dependency("vpim", "13.11.11")
19
19
 
20
20
  spec.add_development_dependency("cucumber")
21
+ spec.add_development_dependency("pry")
21
22
  spec.add_development_dependency("rspec")
22
23
  spec.add_development_dependency("rake")
23
24
  spec.add_development_dependency("fakefs")
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "fakefs/safe"
2
2
  require "pathname"
3
+ require "pry"
3
4
 
4
5
  bin_file = Pathname.new(__FILE__).realpath
5
6
  $:.unshift File.expand_path("../../lib", bin_file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ppl
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Catalini Smith
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rspec
113
127
  requirement: !ruby/object:Gem::Requirement